running macro in different workbook
running macro in different workbook
(OP)
I need to run a macro that's in a closed workbook. The complete filespec is in cell W6 of the active sheet. The macro name is HIGHLITE. I'd like to do this without actually opening the workbook. Is this possible? If so some code would help a lot.
Thanks, LonnieP
Thanks, LonnieP
RE: running macro in different workbook
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: running macro in different workbook
Maybe someone out there can give a definite Yes or No on this.
LonnieP
RE: running macro in different workbook
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: running macro in different workbook
LonnieP
RE: running macro in different workbook
The procedure for adding VBA references given by John Walkenbach (I'm looking at Excel 2002 Power Programming with VBA) is probably the easiest way to use a macro in a different workbook, but strictly speaking the referenced workbook is no longer closed once you have created the reference. The file doesn't need to be open to create the reference, but when it is created the file is automatically opened. If you link to a standard Excel file (.xls, xlsm, or xlsb) the file will be accessible after the reference is completed, just like any other open workbook. If you link to an add-in file (xla or xlam) the worksheets will be hidden, but the file will still be there in the background, and the VBA code will be accessible, unless it has been locked and protected.
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/
RE: running macro in different workbook
My system is based on small spreadsheets that can be stacked together, kind of like Legos. Sometimes I need to move, copy or delete a module but due to most of it being 'off screen', painting the range manually is too cumbersome. However, it's possiblle to make a VB macro that can paint the proper range. The down side is few of the blocks (modules) are the same size and the 100% solution would be to have the copy/move/delete macros in the module file itself, to be called when needed (hopefully without needing to actually open the file).
RE: running macro in different workbook
TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Need help writing a question or understanding a reply? forum1529: Translation Assistance for Engineers
RE: running macro in different workbook
Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/