ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to copy VBA project? (https://www.excelbanter.com/excel-worksheet-functions/9825-how-copy-vba-project.html)

cubus

How to copy VBA project?
 
How to copy VBA project (macros) from one workbook to another
workbook(create exact copy)? Please show in detail.

thanks



JulieD

hi

open both workbooks
in the VBE window display the project explorer
click on the module that you want to copy to the other workbook in the
project explorer
drag it to the workbook name and let the mouse go
the module will be copied there.

Cheers
JulieD

"cubus" wrote in message
...
How to copy VBA project (macros) from one workbook to another
workbook(create exact copy)? Please show in detail.

thanks





hi.
open the vb editor Alt+F11
in the left pane (vb projects), right click the project
you wish to export. (expand the trees if neccessary.)
click export on the popup menu.
The project will be exported as a .bas file(text).
default destination will be office directory.

to import to another file, open the file.
open the vb editor. right click the file name in the vb
project pane (left). click import on the popup menu.

-----Original Message-----
How to copy VBA project (macros) from one workbook to

another
workbook(create exact copy)? Please show in detail.

thanks


.


cubus


wrote in message
...
hi.
open the vb editor Alt+F11
in the left pane (vb projects), right click the project
you wish to export. (expand the trees if neccessary.)
click export on the popup menu.
The project will be exported as a .bas file(text).
default destination will be office directory.

to import to another file, open the file.
open the vb editor. right click the file name in the vb
project pane (left). click import on the popup menu.

-----Original Message-----
How to copy VBA project (macros) from one workbook to

another
workbook(create exact copy)? Please show in detail.

thanks



Some note: I want *all* VBA content of given workbook to be copied, not just
separate modules.




hi again,
If that be the case, it may be easier to copy the WB to a
new name and delete the data from the new WB.
The way i discribed is for 1 project at a time.
JulieD has a good idea too.

-----Original Message-----

wrote in message
...
hi.
open the vb editor Alt+F11
in the left pane (vb projects), right click the project
you wish to export. (expand the trees if neccessary.)
click export on the popup menu.
The project will be exported as a .bas file(text).
default destination will be office directory.

to import to another file, open the file.
open the vb editor. right click the file name in the vb
project pane (left). click import on the popup menu.

-----Original Message-----
How to copy VBA project (macros) from one workbook to

another
workbook(create exact copy)? Please show in detail.

thanks



Some note: I want *all* VBA content of given workbook to

be copied, not just
separate modules.


.


Bob Phillips

"cubus" wrote in message
...

Some note: I want *all* VBA content of given workbook to be copied, not

just
separate modules.


Not designed to encourage further help!



cubus


"Bob Phillips" wrote in message
...
"cubus" wrote in message
...

Some note: I want *all* VBA content of given workbook to be copied, not

just
separate modules.


Not designed to encourage further help!


Not clear. What do you mean?



Bob Phillips

Your answer sounded like it was complaining about the advice offered ...
Some note:
"cubus" wrote in message
...

"Bob Phillips" wrote in message
...
"cubus" wrote in message
...

Some note: I want *all* VBA content of given workbook to be copied, not

just
separate modules.


Not designed to encourage further help!


Not clear. What do you mean?






All times are GMT +1. The time now is 12:02 AM.

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