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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

parry

MrExcel MVP
Joined
Aug 20, 2002
Messages
3,355
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.
 

chiello

Well-known Member
Joined
Jan 18, 2005
Messages
848
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
 

TrippyTom

Well-known Member
Joined
Nov 16, 2004
Messages
587
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.
 

Forum statistics

Threads
1,147,848
Messages
5,743,525
Members
423,801
Latest member
paulj4177

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
Top