In a Visual Basic program I'm making, I have made a program where I enter text into a textbox and it writes it into a txt file (which opens in Notepad). But when I specify...
filename = "Document.txt"
... "filename" is underlined blue and an error says "Name 'filename' is not declared.
Why is this? Even if I provide the full path like this...
filename = "C:\Document.txt"
... "filename" still has that error.
How can I get it to write my data into that file? I'm trying to specify where the file is. And then I use "filename" in the rest of the code so it writes that textbox's data into the file.
filename = "Document.txt"
... "filename" is underlined blue and an error says "Name 'filename' is not declared.
Why is this? Even if I provide the full path like this...
filename = "C:\Document.txt"
... "filename" still has that error.
How can I get it to write my data into that file? I'm trying to specify where the file is. And then I use "filename" in the rest of the code so it writes that textbox's data into the file.