Posted by: mylifeishz 20 May, 2008 - 08:28 AM
Hi, I am sorry to bother you but I have tried several different things and I finally got my code fixed except for how it looks in my text file. My code looks like this:
CODE
' Project name: Memo Project
' Project purpose: The project writes the contents of a multiline text
' box to a sequential access file.
' Created/revised by: <> on <>
Option Explicit On
Option Strict On
Public Class MainForm
Private Sub MainForm_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Me.Load
End Sub
Private Sub exitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton.Click
Me.Close()
End Sub
Private Sub memoTextBox_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles memoTextBox.Enter
memoTextBox.SelectAll()
End Sub
Private Sub writeButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles writeButton.Click
Dim file As String = "C:\Course Technology\83623-0\VbReloaded\Chap09\Memo Solution\Memo Project\memo.txt"
Dim Intro As String = "To all employees:"
Dim Body As String = "The annual picnic will be held at Rogers Park on Saturday, July 13. Bring your family for a day full of fun!"
Dim blank As String = ""
Dim name As String = "Carolyn Meyer"
Dim title As String = "Personnel Manager"
My.Computer.FileSystem.WriteAllText(file, Intro, True)
My.Computer.FileSystem.WriteAllText(file, Body, True)
My.Computer.FileSystem.WriteAllText(file, blank, True)
My.Computer.FileSystem.WriteAllText(file, name, True)
My.Computer.FileSystem.WriteAllText(file, title, True)
End Sub
End Class
I have almost everything done. I just need help in the way the information is displayed in my text file.
It is supposed to look like this:
To all employees:
The annual picnic will be held at Rogers Park on Saturday, July 13. Bring
your family for a day full of fun!
Carolyn Meyer
Personnel Manager
Instead it looks like this: To all employees:To all employees:The annual picnic will be held at Rogers Park on Saturday, July 13. Bring your family for a day full of fun!Carolyn MeyerPersonnel Manager
Does anyone know how to fix this?
Posted by: mylifeishz 20 May, 2008 - 10:19 AM
Thanks for all the looks. I think I have it figured out finally. It must be kind of a hard topic as nobody was able to help, but thanks anyway. This site is wonderful!