Tough for me - Import 30 macros from one excel file to another in
"Dileep Chandran" wrote:
To the Masters Of Microsoft Excel:
How can I import or copy and paste around 30 different from one file
to another automatically?
I have 30 standard macros (fixed) in one workbook. I need to be used
in another workbooks as well. I couldnt make copy of my existing
workbook and work.
Can anybody help me in getting a macro which will import the entire 30
to any other excel file?
You can access the component parts of your project and export the module
with the macros and then import it to the new book.
ActiveWorkbook.VBProject.VBComponents("module1").E xport macroFile
Workbooks.Add
' Add the macro file to the new book
ActiveWorkbook.VBProject.VBComponents.Import macroFile
for completeness, you should erase the macro file.
Peter
|