87Views3Replies

Author Options:

VB help, (text files)? Answered

Hi, so basically i need to create a .txt file when i press a button but it has to be named as what i entered into textbox1.text ANY HELP GUYSSS!!!!!!!!!

Discussions

0
None
Clarusglassboards

Best Answer 8 years ago

http://msdn.microsoft.com/en-us/library/5t9b5c0c%28VS.85%29.aspx should provide you with the help you need. The MSDN is very helpful with these kinds of questions. :) Good luck.

note: recommend switching from VB to C++

0
None
PREDATOR_UK

8 years ago

Oh and i wouldnt switch to c++ unless you want to do proper hard coding and windows programming.

0
None
PREDATOR_UK

8 years ago

To easily create a text file we create something called a file stream. The filestream will then be assigned the of creating your file. We do this by using this code:

Dim fs as system.io.filestream ' Open the filestream
fs = system.io.fie.create("C:\Users\...") ' Or whatever path you want
fs.close ' Remember this because otherwise it can cause problems

Copy the above code straight in.

Regards,
PRED