bhuether
05-15-2003, 03:37 AM
I am new to VB and and trying to figure out how to do basic file I/O stuff like opening a file, writing some text and data to it, etc. I suppose that info is probably in my manual, but it is in German and my German is not quite that good!
-brian
Use:
Print #X, String
With X as file number
PWNettle
05-15-2003, 09:33 AM
Dim lFileHandle As Long
' Get a safe file handle.
lFileHandle = FreeFile
' Open a file for output.
Open "c:\yourpath\yourfile.txt" For Output As #lFileHandle
' Write some data to the file.
Print #lFileHandle, "Your Text or Variable"
' Close the file.
Close #lFileHandle