ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tough for me - Import 30 macros from one excel file to another in one step (https://www.excelbanter.com/excel-programming/393615-tough-me-import-30-macros-one-excel-file-another-one-step.html)

Dileep Chandran

Tough for me - Import 30 macros from one excel file to another in one step
 
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?

Thanks in advance

-DC


barnabel

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

Randy Harmelink

Tough for me - Import 30 macros from one excel file to another in one step
 
Why not convert the macro workbook into an XLA add-in file and just
active that in EXCEL so it is available for any workbook you create in
EXCEL?

On Jul 18, 7:23 am, Dileep Chandran wrote:

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?




All times are GMT +1. The time now is 04:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com