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

Extra - pen Excel and call Macro in Personal.xls ?

Status
Not open for further replies.

scottmh

Technical User
Aug 26, 2003
15
US
I've got a macro in Extra that when run will open two CSV files in Excel. I've then created an Excel macro to format the files to my liking, but, I woulld like to Extra call that macro for me.

Is there a way to do this?

Scott
 
Sure, put it in the open event of a workbook, then have Extra open that workbook.

calculus
 
That would probably work, but, I don't want the macro to run everytime I open that file. I wish to have it run only when a certain sequence of events happen, or have one macro (extra) run then give Excel the foreground and have extra tell it to run a macro in the personal.xls file.

Thanks,
Scott
 
To my knowledge you can't have Extra call a specific procedure in Excel. You can, however, have Excel control Extra and therefore do whatever you need to do when you need it done.

Check out the FAQ:
faq99-4069 How do I use VB(A) to manipulate attachmate (6.5+)?

calculus
 
cal,
I found by using SacToCal's sample code from this thread thread1-428362 was able to do it. All I did was make this code a Header File, and changed
' Open a Workbook
Set objWorkBook = objExcel.Workbooks.Open("yourfile.xls")

to
' Open a Workbook
objExcel.Run("Personal.xls!" + strMacroNm)

and it runs. I call the Sub from the EBH in my macro and it does what I needed it to do.

Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top