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.
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.
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+)?
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.