devxlogo

January 27, 2003

LogEvent – Logging an error/event to the Windows NT/2000 Application Event Log

‘ Log an error/event to the Windows NT/2000 Application Event Log.’ Usage: LogEvent(“Message here”, EventLogEntryType.Information)Sub LogEvent(ByVal message As String, ByVal entryType As EventLogEntryType) If EventLog.SourceExists(Application.ProductName) = False Then EventLog.CreateEventSource(Application.ProductName, “Application”)