C
CSharp
C++
Java
Visual Basic
HTML - CSS
Android
Asp
Asp.Net
Php
Python
JavaScript
SQL
XML
Assembly
ActiveX
API
Code Snippets
Database
Files Directories Drives
Forms
Graphics Games
Multimedia
Strings
Windows and Controls
More...
Visual Basic > Internet Web Mail Stuff sample source codes
Visual Basic Code > Use a logging file
Use a logging file Just wanted to give you the code for the error_log that I have written thanks to tips from you. If you think it would be useful you can put it up on the website. This is real simple, and the file is kept open for the full session, that the application is running. It is called by putting in the following call in the login or first form of the application Setup_Error_Log and calling the Close_Error_Log when exiting the application. Public sub Setup_Error_Log() Dim strErrorLog as String On Error GoTo ErrSetup_Error_log strErrorLog = App.Path & "\" & App.EXEName & ".log" If Dir(strErrorLog) <> "" Then Kill strErrorLog intFileNum = FreeFile Open strErrorLog For output as intFileNum Exit Sub ErrSetup_Error_log: MsgBox "error " & Err & Err.Description End Sub Public sub Close_Error_Log() Close #intFileNum End Sub Return
Privacy Policy
|
Contact
|
Advertising
|
Link to Us
|
Directory