Computer Science Canada

Save a file

Author:  HazySmoke)345 [ Mon Feb 27, 2006 8:31 pm ]
Post subject:  Save a file

I'm just wondering how to create/save a file with visual basic. I have no idea how to start. What I'm trying to do now is that I want to create a file at C:\ called "testing.dat" and write the following text:
code:
1
12
123
1234

Since I never tried to create a file, I have no idea how to do it... anyone knows the syntax for it?

Author:  cool dude [ Tue Feb 28, 2006 5:59 pm ]
Post subject: 

Private Sub Form_Load()
Open "c:/filename" For Output As #1
Write #1, "1" + "2"
End Sub

i think thats wat u want. the open for output creates the file and the write statement writes watever u want in the file


: