Closed Thread
Results 1 to 2 of 2

CAE macro for green screen updates with Excel data

  1. #1
    Sriram
    Guest

    CAE macro for green screen updates with Excel data

    I am a user of the Personal Communications AS/400 (Client Access Express for
    Windows) WorkStation Program IBM software. I am able to record a vbscript
    macro to automate a repetitive update of our ERP using one of the ERP
    options.

    I need to modify the macro so that it picks up the data to be entered from
    an Excel list and "types" it into the appropriate input fields. I need to
    get it to process the entire list of values row by row.

    Right now the macro recorder has produced a statement like
    autECLSession.autECLPS.SendKeys "B11641"

    which I have to replace with commands to essentially
    - switch to Excel
    - read the next row of data
    - switch back to the terminal session
    - Do the SendKeys thing

    working in a loop.

    I'd appreciate a sample script to do this kind of thing since I am not
    familiar with the capabilities of the emulator, though reasonably
    comfortable with vbscript.

    Sriram



  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    You might need something like this...

    Sub Test()
    Set DataRange = Range(Cells(1, 1), Cells(1, 10))
    MyProgID = Shell("C:\MyProg\Myprog.exe")
    AppActivate MyProgID
    For Each Cell In DataRange
    Application.SendKeys Cell, True
    'Add other SendKeys commands here
    Next Cell
    End Sub

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1