Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recording macro that interacts with excel or scratchpad .....

Status
Not open for further replies.

MSDemocrat

Technical User
Mar 24, 2014
1
US
Hello. I am having an issue trying to get a macro to interact with either excel or the scratchpad. I have a list of roughly 600 contract numbers that I need to search for and the copy the value of one of the fields and paste into either an excel file or the scratchpad so i can import it into excel. I have tried playing around with the macro recorder but it does not record the actions I performed on the scratchpad.

I included the code from the macro recorder below. The value being pasted was copied from the scratchpad where I pasted my list of contract numbers. I then ran the Scan (S) function and copied the value from R19C67 and pasted that into the scratchpad next to the conract number.
Code:
Call ibmCurrentScreen.SendKeys("s")
Call ibmCurrentScreen.SendControlKey(ControlKeyCode_Tab)
Call ibmCurrentScreen.SendControlKey(ControlKeyCode_Tab)
Call ibmCurrentScreen.SendControlKey(ControlKeyCode_Tab)
Call ibmCurrentScreen.Paste
Call ibmCurrentScreen.SendControlKey(ControlKeyCode_Transmit)

ibmCurrentScreen.CursorRow = 19
ibmCurrentScreen.CursorColumn = 67


ibmCurrentScreen.CursorRow = 19
ibmCurrentScreen.CursorColumn = 67

Call ibmCurrentScreen.SetSelectionStartPos(19, 67)
Call ibmCurrentScreen.ExtendSelectionRect(19, 67)
Call ibmCurrentScreen.Copy

I have some familiarity with VBA macros in excel but none with attachamte. Any help would be appreciated
 
hi,

My advice: do ALL your coding in Excel VBA.

Loop thru your list in your sheet, write the sheet value to the screen at the appropriate coordinates, send keys to process the transaction, look for a response in your message area and react accordingly on the screen.

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top