Skip to main content

When receiving an error in a macro and it indicates "type mismatch occurred at line: 112", are comments and line spacing included in the count, or just code?

Thanks


#Reflection

When receiving an error in a macro and it indicates "type mismatch occurred at line: 112", are comments and line spacing included in the count, or just code?

Thanks


#Reflection

jcbolton,

I was able to test this with the macro editor using a legacy Extra! Basic Macro Editor.  I find that the line number you see in the editor is the same as the line number that is being reported in the error message.

 

 

So in the example above I have a reference to a bad object in line 11 and when I run the macro, I do see an error in the line where I attempt to reference the bad object.

 

 

Regards,

Jeff


jcbolton,

I was able to test this with the macro editor using a legacy Extra! Basic Macro Editor.  I find that the line number you see in the editor is the same as the line number that is being reported in the error message.

 

 

So in the example above I have a reference to a bad object in line 11 and when I run the macro, I do see an error in the line where I attempt to reference the bad object.

 

 

Regards,

Jeff

Yes, thanks for the response.  I verified this as well.  If you see my code snippet below the error for me is with the "If Not" statement.  Is this not allowed anymore?  How do I display the AtACAPSScreen variable to make sure it is set properly?  Thanks.

'Handle problems with the QMEN status screen here.
AtACAPSScreen = Sess0.Screen.WaitForString("ACAPS Enterprise")

If Not AtACAPSScreen Then
ButtonPressed = MsgBox("I am not detecting that we are at the ACAPS Main Screen Yet. Do you want to continue to wait? Select OK to continue to wait or Cancel to quit", 33, "Continue?")
If ButtonPressed = 2 Then
Goto StopMacro
Else
Sess0.Screen.Sendkeys("<Enter>")

AtACAPSScreenYet = Sess0.Screen.WaitForString("ACAPS Enterprise")

If Not AtACAPSScreenYet Then
MsgBox"Navigation to ACAPS Main Screen Failed. Possibly try macro again later.", 0 64 0, "Macro Stopped."
GoTo StopMacro
End If
End If
End If

System.TimeoutValue = OldSystemTimeout

Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Home>")
Sess0.Screen.WaitHostQuiet(10)