Hi,
Let me begin by thanking everyone in advance for any assistance with this macro problem. A little background: I currently have a very simple Excel macro that will send information contained in cells, one cell at a time, to another macro I have created in an AS/400 style system. The AS/400 style system will prompt for information (for example, name), and the Excel macro will send that information to the prompt, simulate Enter key (creating a new prompt in the AS/400 system), move to the next cell, send the information, etc. over and over until it reaches the last cell with information.
This works fine, however, the only way I know of "timing" the sending of information from Excel is using .Wait Now + TimeValue("0:00:01"). The issue with this is, sometimes the AS/400 system will hang after simulating Enter keystroke, but the Excel macro continues running at a single pace, resulting in some information not being sent properly. Furthermore, if Excel could send information when prompted, instead of waiting a second for each command, my process could be significantly sped up.
My question: is there some kind of way to build into the Excel macro to only send information when a valid prompt is up in the AS/400 system? I have attached a picture of the AS/400 type of prompt I'm speaking of, as well as my very simple macro to feed information to the system.
Again, any assistance with this question is greatly appreciated!
Bookmarks