I have two checkboxes that write different text into the same file.
I am having a problem when the user checks the boxes one overwrites the other. Because they are in different modules. I would like to add the text to the second line.
Do I need an array to have the text go below each other in the same file?
Thanks for all the help.
Sub CheckBoxShowImage_CheckedChange(Checked As Boolean)
myImageView.Initialize("myImageView")
If Checked = True Then
Try
Dim Writer As TextWriter
Writer.Initialize(File.OpenOutput(DirName, FileName1, False))
Writer.WriteLine("This is the first line" & CRLF)
Catch
End Try
Writer.Close
myImageView.Visible = True
Else
myImageView.Visible = False
End If
End Sub
Sub CheckBoxShowImage2_CheckedChange(Checked2 As Boolean)
myImageView.Initialize("myImageView")
If Checked2 = True Then
Try
Dim Writer As TextWriter
Writer.Initialize(File.OpenOutput(DirName, FileName1, False))
Writer.WriteLine("This is the second line" & CRLF)
Catch
End Try
Writer.Close
myImageView.Visible = True
Else
myImageView.Visible = False
End If
End Sub
I am having a problem when the user checks the boxes one overwrites the other. Because they are in different modules. I would like to add the text to the second line.
Do I need an array to have the text go below each other in the same file?
Thanks for all the help.
Sub CheckBoxShowImage_CheckedChange(Checked As Boolean)
myImageView.Initialize("myImageView")
If Checked = True Then
Try
Dim Writer As TextWriter
Writer.Initialize(File.OpenOutput(DirName, FileName1, False))
Writer.WriteLine("This is the first line" & CRLF)
Catch
End Try
Writer.Close
myImageView.Visible = True
Else
myImageView.Visible = False
End If
End Sub
Sub CheckBoxShowImage2_CheckedChange(Checked2 As Boolean)
myImageView.Initialize("myImageView")
If Checked2 = True Then
Try
Dim Writer As TextWriter
Writer.Initialize(File.OpenOutput(DirName, FileName1, False))
Writer.WriteLine("This is the second line" & CRLF)
Catch
End Try
Writer.Close
myImageView.Visible = True
Else
myImageView.Visible = False
End If
End Sub