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 |