Thank you for posting your code. I assume that you’re coding in
Excel VBA. So your code does not need to create an Excel Application object.
So typically when you have a terminal emulator application like Attachmate Extra, that emulates a dumb terminal of some kind, you are dealing with transactions or screens. It might behave something like this, once you have logged into the mainframe system via your emulator.
1) Clear te screen and enter a transaction or screen name as a command, like:
/FOR REQORDS
The mainframe system responds by painting the screen with a the REQORDS form.
2) With the empty form on the screen, you, or your program, are ready to enter one or more search terms into formatted fields in the form.
3) Once the search term(s) are entered, then you SEND a command to the mainframs that instructs the mainframe program to do something, perhaps fill the form with data relevant to the search terms that were just SENT to the mainframe.
4) When the mainframe has completed obtaining the data and returning the data to the form, now you, or your program, must take some or all of the data and put it somewhere else, like in a spreadsheet.
I often provided a service for my users. They would provide me a list of items in a speradsheet, and a request to get certain data for each item. I knew which transaction I needed to access, so my program would loop through the list of items, fill the item on the form, SEND the appropriate command, wait for the mainframe to return the data, grab ALL the data from the form, put the data into a spreadsheet containing all the fields on the form and repeat for each item in the list.
What does your process look like?
It would help us if you would also post a copy of this screen and the list of items you are using from Excel, so that we can see the value in B2 and the corresponding value on your screen.
Skip,
Just traded in my OLD subtlety...
for a NUance!![[tongue] [tongue] [tongue]](/data/assets/smilies/tongue.gif)