Hi...im just starting out with programming and am getting a bit stuck.
ive got my form working in such a way that what i enter in a textbox can be saved as a ".txt" file - which is perfect
however, to make the naming of the file as straightforward for the user as possible, im trying to code it so they have don't have to manually input filepaths which can often turn out to be tricky.
so at the moment, i have a folder browser which puts the selected path into a text box.
next, i have a textbox where the user can enter the name they want for the file... eg "ITEM 1"
then, i have coded the following:
"tbMix.Text = tbFileName.Text & "\" & tbScriptName.Text & ".txt""
tbMix is a textbox which collects from tbFileName (the selected path) and tbScriptName (where the user has entered "ITEM 1") and also puts in a "\" to ensure the path is accepted, plus ".txt" to save in the correct format.
when i run this code, the information is all collected correctly in the right textbox, but when i click save, i get "illegal characters in path" as an error.
worth mentioning -- when i manually type the file path, it saves fine..
thanks for your help!
M
[[Code for the "save" button:
Private Sub ConfirmSaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ConfirmSaveToolStripMenuItem.Click
Dim objwriter As New System.IO.StreamWriter(tbMix.Text)
objwriter.Write(tbUpperBody.Text)
objwriter.Close()
End Sub
]]]

