In Excel, there are 100 records. The macro goes thru various screens to capture data, put into Excel, and post commands into Attachmate.
In one of the screens, the cursor is on 23, 7. I send a command F8 continuously until a message appears on line 24. F8 goes to the next record so the screen. Fields are the same as the last screen except for the data. If there is a message 'last record' on line 24, then it captures data on that screen and put it into the spreadsheet.
This works if I go thru each line in the code in Excel module in debug mode. But if I run it, it will do about 5 records.
Do until Sess0.screen.getstring(24,2,11)="last record")
Sess0.screen.SendKeys ("PF8")
Do Until .Screen.WaitForCursor(23, 7)
DoEvents
Loop
loop
Any help is appreciated
In one of the screens, the cursor is on 23, 7. I send a command F8 continuously until a message appears on line 24. F8 goes to the next record so the screen. Fields are the same as the last screen except for the data. If there is a message 'last record' on line 24, then it captures data on that screen and put it into the spreadsheet.
This works if I go thru each line in the code in Excel module in debug mode. But if I run it, it will do about 5 records.
Do until Sess0.screen.getstring(24,2,11)="last record")
Sess0.screen.SendKeys ("PF8")
Do Until .Screen.WaitForCursor(23, 7)
DoEvents
Loop
loop
Any help is appreciated