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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extra X-Treme Macro read from Excel 1

Status
Not open for further replies.

lithium78

IS-IT--Management
Sep 27, 2010
6
0
0
US
Let me apologize in advance for being woefully un-educated in the art of macro creation. This project fell in my lap and I'm at a total loss.

We have an Excel sheet that contains values in A1:A15. I need to create a macro that will copy the value from Cell A1 and paste into into Extra!, there will be a couple of other commands exectued at this point and then I need it to return to Excel and grab cell A2 and paste... rinse and repeat until we hit A15.

I had hoped I could just use the record macro option... but alas it does not record the portion where I leave Extra! and grab the data from Excel.

Any assistance you can provide would be greatly appreciated.

 
To copy of Excel towards extra it is enough to record with extra. But to copy of extra towards Excel I do not know.
 


Hi,

Of course you need to set the Excel Application object, just as you set the Extra System object.

Then
code]
dim xl as object, r as object

xl.sheets(1)
for each r in .range(.Cells(1, "A"),.Cells(1, "A").end(xldown))
oScreen.PutString(row,col) = r.value
next
end with
[/code]
where oScreen is your Extra screen object and row is a variable containing the target row and col is a variable containing the target column. Of course you must control your variables.

The range technique, means that all you need to specify is the starting row and the END property extends the range in the specified direction, to the last cell containing any value.



Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Thank you so much, I ended up looking through a number of posts and figured out how to do what I needed (and in the process I figured out how to do even more than I initially hoped)

This is obviously very new to me, but some of the things that can be accomplished is rather exciting. I need to find a resource that lists all of the available VBA commands rather than just happening upon them by accident. :)

 


Look in HELP

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top