sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I'm using this to record an event;
and this to call the event, which is triggered by a compile error;
My issue is that it is only recording the Evnt and not the others - can someone show me what I need to do please to get it to record all of the error details?
Code:
Sub ErrorAUDIT(Evnt As String)
Application.ScreenUpdating = False
Set ws = Worksheets("Audit")
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ws.Cells(iRow, 1).Value = Now
ws.Cells(iRow, 2).Value = Evnt
ws.Cells(iRow, 3).Value = evnt2
ws.Cells(iRow, 4).Value = Evnt3
ws.Cells(iRow, 5).Value = Evnt4
ws.Cells(iRow, 6).Value = Evnt5
Application.ScreenUpdating = True
End Sub
and this to call the event, which is triggered by a compile error;
Code:
Dim Evnt As String
Evnt = "Program Error"
evnt2 = ErrNo
Evnt3 = strDescription
Evnt4 = strProcedure
Evnt5 = ErrLine
Call ErrorAUDIT(Evnt)
My issue is that it is only recording the Evnt and not the others - can someone show me what I need to do please to get it to record all of the error details?