Write Entries To a Log File

Category:
Files and Directories
Type:
Modules
Difficulty:
Beginning
Author:
Jan Nijboer

Version Compatibility: Visual Basic 6

More information:
Module to write entries to a logfile in the application's directory. If the existing logfile exceeds the size specified in MaxLogSize, the file is copied to [filename].old and a new logfile is created.

Just add it to your project and call the procedure WriteLog with a log-entry as a parameter. A reference to the scripting runtime is required.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: