Copy macro's to another file

Mvdsandy

New Member
Joined
Sep 26, 2014
Messages
3
Dear all,

For the first time I programmed a macro using VBA. It makes a new workbook with 2 worksheets of the current workbook. Inside those two sheets are buttons. If I send the file to my colleagues nobody can use the macro's because it will not copy the macro's into the new file.

Can someone help me with this macro?
I did not found anything about it on this forum or google. Can you guys please help me to make the program that copies the current macro's of that file into the new workbook? Thank you in advance.
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

ChrisBM

Board Regular
Joined
Sep 22, 2014
Messages
215
In order to save the macros in your file try saving the file as a .xlsm or a .xlsb file.

.xlsm - Excel Macro-Enabled Workbook
.xlsb - Excel Binary Workbook

That way the macros will be saved in your workbook.

Hope that helps, let me know if you have any issues.

Kind Regards,
Chris
 

Watch MrExcel Video

Forum statistics

Threads
1,114,525
Messages
5,548,556
Members
410,849
Latest member
DannyNg
Top