as400 Macro to copy/paste info from excel

Posted on 2011-10-29
Medium Priority
Last Modified: 2016-12-11
Hi, I need a macro for as400 which will take info from an excel spreadsheet and copy/paste the info into as400 and then go back to the spreadsheet until all the rows are processed.  (Ex, cell A1 is an account #, B1 is a date (no slashes) & C1 is text).  I'd like it to process through each row and paste the info into as400.  I have to use the sendkey command at the appropriate times between pasting some of the info.  Does anyone have anything that can help me accomplish this?
Question by:jstein1
  • 2
LVL 16

Accepted Solution

theo kouwenhoven earned 2000 total points
ID: 37052452

I don't know if it helps, but you can configure the keyboard (change mapping option in Client access)
so that you have a paste-Next key. e.g. attach paste next to  Ctrl+N  now you can copy the whole excel sheet and paste it to your screen (Ctrl-V), for every next part of the sheet press Crtl-N.

Otherwise, use this client access macro, it's read your excel, paste it to the as/400 and check for errors.

Rename the file from .txt to .mac to use it


LVL 16

Expert Comment

by:theo kouwenhoven
ID: 41921677

I cant remember exactly what it test, But I think, the script is first looking to the program-name on the left upper corner (or right)
that must be the name corresponding with the data you will let the macro enter.

Every error on the bottom row wil be checked and in case of errors the excel line wil be marked in red.
processed lines in green.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question