Error code=2

  • Thread starter Thread starter Derek
  • Start date Start date
D

Derek

Hi gents,
I have a workbook that uses macro's for various tasks
including a "Workbook_BeforeClose". Nothing in the coding
has changed for weeks, but I now get an error message on
closedown of "Routine location error code=2. Please
record this error code" Can anyone give me clue as to
what it means or where to look for the error.

TIA derek
 
Hi Derek

Here's a way to make a list of errors with numbers:

Sub ErrorList()
Dim L As Long
On Error Resume Next
For L = 1 To 1000
Err.Raise (L)
Cells(L, 1).Value = Err.Number
Cells(L, 2).Value = Err.Description
Err.Clear
Next
End Sub

According to it, 2 is the usual "Application-defined or object-defined
error". So seeing the macro would help a lot.
 
Back
Top