1 reply
by gen_arg
roxy_trev:
You are opening and writing to a file through Visual Basic for Applications commands & statements, including the Open statement, that opens and defines the opening mode for the file.
Your problem is with the actual mode you are using with the Open.
You must be using a sentence similar to the following:
Open strFileName for Output as #1
To solve your problem, you should be using a sentence like this:
Open strFileName for Append as #1
The difference is in the mode:Append instead of Output.
With Append, every time a user logs in, the new log line will be "appended" at the end of the file. With Output, you substitute the last (and only) line with the new one, so you end up with only one line (always the lastone).
To add date and time of log-in, you can use this:
Format$("mm/dd/yyyy hh:nn:ss", Now())
This should solver your problems. Good luck !!!
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending