Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AS400 WAITFORSTRING thru Excel VBA 1

Status
Not open for further replies.

GJFrantsen

Programmer
Jul 20, 2005
2
US
I'm having trouble getting the WAITFORSTRING to wait for a string on the AS400 through Excel VBA.
I'm writing a system monitoring tool and I need to flip around to different screens and check values in fields. I can drive the screen, scrape the screen, etc., but when I PF12 back, VBA won't wait for the COPYRIGHT message.

Also, WAITHOSTQUIET doesn't seem to do anything.

Any suggestions?
 
Are you using the WaitForString method with or without the x,y coordinates?

The other good option is to use this:
Do while Sess0.Screen.OIA.Xstatus <> 0
Doevents
Loop

This will wait until the "X Clock" is gone from the bottom of the screen. Sometimes I'll add a WaitForString after this statement to be sure my code is matching Extra.

calculus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top