• Welcome to Valhalla Legends Archive.
 

VB/ Using the Print #1 Statement

Started by Crypticflare, March 07, 2003, 03:30 AM

Previous topic - Next topic

Crypticflare

Allright I've been fiddling around with stuff and I'd like to know what I've been doing wrong with this line of code

Open (App.Path & "\TextLog" & Time & ".txt") For Output As #1
I'd like it to output a textlog, and with the name of the text file it has the Time, and Date created (though I didn't add date) is this not possible or would I have to do somthing else?

Spht

#1
A filename cannot contain any of the following characters:
\ / : * ? " < > |

Spht

#2
Or if that wasn't your problem, for printing data to that file, use:

Print #1, DATA

DATA being what you want to write to the file.

If you want to add text to the file as it gets in, use Append instead of Output when accessing the file. Then Print will add the DATA on a following line in the file.

Mesiah / haiseM

#3
also, that #1 is just a little number you use to keep track of which file is open, so if you call another subroutine and do a Print #1, then youll be printing to that file, if it hasnt been closed.
]HighBrow Innovations
Coming soon...

AIM Online Status: