Discussion Locked

VBA 5 help

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I was asked to make a Sercurity login program, that would run up upon start up of the computer.
It also had to have a logbook, one that recorded fake attemps.
Then i hit a problem. Every time the computer is restarted, the logbook rewrites the data in the file.
If I use brinary, I cant read the file with out VB. If I use output, it will rewrite the book.
Help would be accepted.
Ash

5 replies

by tclere

Instead of using:

Open("Yourfile.txt") for Output As #1
Write #1, YourStuff

Use:

Open("Yourfile.txt") for Append as #1
Write #1, YourStuff

This will append YourStuff to the end of the file instead of rewriting the file each time the program is run.

Hope this is what you were looking for!

by webmaster

I would definitely use a TXT file for your loggin, because of its simplicity and the append function.

This discussion is closed to new replies.