Jump to content

VBScript in AS400 iSeries to Copy & Paste Excel Value into AS400


Lana
 Share

Recommended Posts

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=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine
subSub1_

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 Sub

Any help is much appreciated!

Thanks so much!
Lana

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...