I am trying to port this sub routine over to Excel VBA from Extra basic
Sub Move(ByVal value$, ByVal field$, ByVal enter As Boolean)
Dim x As Integer, y As Integer
x = Left(field, InStr(field, ",") - 1)
y = Mid(field, InStr(field, ",") + 1, (Len(field) - InStr(field, ",") + 1))
mySess.Screen.MoveTo x, y
System.ActiveSession.Screen.SendKeys (value$)
If enter Then
System.ActiveSession.Screen.SendKeys ("<Enter>")
End If
Do
'Wait Until The Attachmate Screen Has Updated
Loop Until System.ActiveSession.Screen.Updated = True
System.ActiveSession.Screen.WaitHostQuiet (150)
End Sub
I keep getting the error: Object variable or With block variable not set.
What am I doing wrong?
Sub Move(ByVal value$, ByVal field$, ByVal enter As Boolean)
Dim x As Integer, y As Integer
x = Left(field, InStr(field, ",") - 1)
y = Mid(field, InStr(field, ",") + 1, (Len(field) - InStr(field, ",") + 1))
mySess.Screen.MoveTo x, y
System.ActiveSession.Screen.SendKeys (value$)
If enter Then
System.ActiveSession.Screen.SendKeys ("<Enter>")
End If
Do
'Wait Until The Attachmate Screen Has Updated
Loop Until System.ActiveSession.Screen.Updated = True
System.ActiveSession.Screen.WaitHostQuiet (150)
End Sub
I keep getting the error: Object variable or With block variable not set.
What am I doing wrong?