P
Planner
I am trying to pass a public variable between modules to a Goto
statement.
Example
Public Sub Do_a_Lot (Err_Code)
Dim Err_Code As Integer
'When something goes wrong
On Error Resume Next
Err_Code = 1
Call Errorcall(Err_Code)
End Sub
The in a seperate Module I have the Error handling
Public Sub Errorcall(Err_Code)
X=Err_Code
Goto X:
However the macro errors out when trying to initialise the Errorcall
module because whilst compiling it hits the Goto statement with label
X not defined, but it needs to be defined by the Err_code.
Thanks in advance
John
statement.
Example
Public Sub Do_a_Lot (Err_Code)
Dim Err_Code As Integer
'When something goes wrong
On Error Resume Next
Err_Code = 1
Call Errorcall(Err_Code)
End Sub
The in a seperate Module I have the Error handling
Public Sub Errorcall(Err_Code)
X=Err_Code
Goto X:
However the macro errors out when trying to initialise the Errorcall
module because whilst compiling it hits the Goto statement with label
X not defined, but it needs to be defined by the Err_code.
Thanks in advance
John