afortuna98
Programmer
What I am wanting to do is have the macro check a specific screen location in Attachmate for any value other than nothing. If there is a value, then continue running the macro, if there is nothing then stop running the macro. I've tried using the following, but it isn't working:
Location = Trim(Sess0.Screen.GetString (8,31,1))
If Location = "" Then
STOP
End IF
If I use the word "STOP" then it compiles fine, but ignores the IF/Then statement. If I use the word "EXIT" then I get a Syntax Error for the word "EXIT" and the "End If" becomes an illegal statement. I've been able to use something similar for placing values into an Excel cell when there is nothing on the Attachmate screen location:
Location = Trim(Sess0.Screen.GetString (8,31,1))
If Location = "" Then
obj.WorkSheets("Quarterly Macro").Cells(3, "A").Value = 0
End IF
I'm missing something.
Location = Trim(Sess0.Screen.GetString (8,31,1))
If Location = "" Then
STOP
End IF
If I use the word "STOP" then it compiles fine, but ignores the IF/Then statement. If I use the word "EXIT" then I get a Syntax Error for the word "EXIT" and the "End If" becomes an illegal statement. I've been able to use something similar for placing values into an Excel cell when there is nothing on the Attachmate screen location:
Location = Trim(Sess0.Screen.GetString (8,31,1))
If Location = "" Then
obj.WorkSheets("Quarterly Macro").Cells(3, "A").Value = 0
End IF
I'm missing something.