Lana Posted November 26, 2015 Share Posted November 26, 2015 Hello,I stumbled upon the following post from 2007 and was wondering since it's so old (as mentioned in the post below) if someone can assist me with some VBSCRIPT code to copy & paste a value from Excel into the AS400 green screen (see my basic recorded macro code below). I'm interested in having the AS400 macro loop through the vendor list in Excel. For example, it would pick the first vendor from the Excel list, then paste it into the field as shown in the RED FONT below, then perform a few more steps that aren't shown in the code below. Then start it over again with the next vendor on the Excel list. [PCOMM SCRIPT HEADER]LANGUAGE=VBSCRIPTDESCRIPTION=[PCOMM SCRIPT SOURCE]OPTION EXPLICITautECLSession.SetConnectionByName(ThisSessionName)REM This line calls the macro subroutinesubSub1_sub subSub1_()autECLSession.autECLOIA.WaitForAppAvailable autECLSession.autECLOIA.WaitForInputReady autECLSession.autECLPS.SendKeys THIS IS WHERE I WANT TO COPY AND PASTE THE VENDOR NUMBER RETRIEVED FROM EXCEL autECLSession.autECLOIA.WaitForInputReady autECLSession.autECLPS.SendKeys "[enter]"end SubAny help is much appreciated!Thanks so much!Lana Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now