Logging examples

The following code illustrates the use of logging methods and constants.

Sub ShowLogInAWindow(App As Object)

'----------------------------------------------------------------------

' Call this function in the AppStart event, for example, in any module.

' Supply the function with the current Application object

' All events fired are shown in a top-level window.

' No properties, methods, or collection used are logged. Only events

' that are fired are logged.

'----------------------------------------------------------------------

    Call App.LogSettings(ehLogWindow, ehAllEvents)

 

End Sub

 

Sub WriteEventLogToFile(App As Object)

'----------------------------------------------------------------------

' Call this function in the AppStart event, for example, in any module.

' Supply the function with the current Application object

' All events that are fired are logged, whether or not there is

' any user code to execute.

' All properties, methods, and collection used are logged, as well.

'----------------------------------------------------------------------

    Call App.LogSettings(ehLogFile, ehAllEventsAndMethods)

 

End Sub