Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

VB create text file

Name: Anonymous 2011-06-02 0:37

Is there a way of creating a text file based on a variable?

Dim fso, MyFile
Dim fname As String

fso = CreateObject("Scripting.FileSystemObject")

MyFile = fso.CreateTextFile("c:\address\fname.txt", True)

MyFile.WriteLine(TextBox1.Text)
MyFile.WriteLine(TextBox2.Text)
MyFile.WriteLine(TextBox3.Text)

MsgBox("File Created!")

MyFile.Close()

Example

basically i want to use textbox1.text as the filename, instead of declaring the filename in MyFile

Name: Anonymous 2011-06-02 0:50

FUCK YOU ASSHOLE

STOP POSTING THIS SHIT ON PROG

Name: Anonymous 2011-06-02 3:49

>>2
RUDE!

Name: Anonymous 2011-06-02 3:54

>>1
Start by posting some code of your problem.

Name: Anonymous 2011-06-02 4:01

>>1
Start by dropping out of high school and selling meth to kids.

Don't change these.
Name: Email:
Entire Thread Thread List