can a macro be saved as a part of excel?

rainxking

New Member
Joined
Oct 14, 2004
Messages
14
How can I save a macro so that it is always available no matter what excel file i have open?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Save in the personal.xls file which is stored in your xlstart folder. You may not have this file as its created when you record a macro and select Personal Macro Workbook in the Store In dropdown. You can do a dummy record then open the personal.xls file and pop in your code or just create a new file with this name. Note the files in xlstart normally have the hidden attribute so show all files via Tools|Folder Options|View in My Computer.
 
Upvote 0
If you want a macro to be available whenever you use Excel
- select Personal Macro Workbook in the Store macro in box, if you are recording it;
- Type or copy your code into the code window of the module relevant to Personal.xls
 
Upvote 0
Try this:

Put the name of the file containing your macro in here:
Tools > Options > General Tab ...
"Alternate Startup File Location" = _____________ (put your filename with the macro here)

This allows the macro in your file to be shared with other open workbooks while you're working in Excel.

[edit] -- Or do what the previous guy said. Either way, it's going to open up an extra workbook every time you start Excel. Personally, this is annoying to me, but it seems to be the only way to do it.
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,460
Members
448,965
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top