K
Kelly
Hey all -
I need a little more help. I don't quite know why my text file or form isn't
closing.
Short version - this program takes data entered into a textbox, user clicks
Save button, Save As dialog box pops open, user selects file to save to,
data *should* save to the file, file close, form close.
The way I have it written so far, the data *does* save to the file, however,
I have to first close the file and then re-open it to see the changes. I've
been playing with the code a little to get the form and file to close after
the user selects the file from the Save As dialog box and clicks OK.
I got help the other day from a few of you and was hoping for another kick
in the right direction...I'm not too familiar with the .NET syntax yet.
Here's the snippet of code I'm playing with...
Select Case sFileExtension.ToUpper
Case ".TXT"
Shell("notepad.exe " & sFileName, AppWinStyle.MaximizedFocus)
FileOpen(f, sFileName, OpenMode.Append)
PrintLine(f, sInfo)
'FileClose(f) ' doesn't work
'Form1.ActiveForm.Hide() ' doesn't work
I need a little more help. I don't quite know why my text file or form isn't
closing.
Short version - this program takes data entered into a textbox, user clicks
Save button, Save As dialog box pops open, user selects file to save to,
data *should* save to the file, file close, form close.
The way I have it written so far, the data *does* save to the file, however,
I have to first close the file and then re-open it to see the changes. I've
been playing with the code a little to get the form and file to close after
the user selects the file from the Save As dialog box and clicks OK.
I got help the other day from a few of you and was hoping for another kick
in the right direction...I'm not too familiar with the .NET syntax yet.
Here's the snippet of code I'm playing with...
Select Case sFileExtension.ToUpper
Case ".TXT"
Shell("notepad.exe " & sFileName, AppWinStyle.MaximizedFocus)
FileOpen(f, sFileName, OpenMode.Append)
PrintLine(f, sInfo)
'FileClose(f) ' doesn't work
'Form1.ActiveForm.Hide() ' doesn't work