Save Macros in Excel

From IARC 207 Wiki
Jump to navigation Jump to search

By default Excel doesn't really want you to save out macros to have them available for use at any time. These macros are normally stored in a file that is opened every time Excel is started, 'personal.xls'. However, this file is hidden in the Visual Basic Editor until you do one thing.

To make it visible follow these strange steps:

 1) From the File/Edit/View... row open 'Tools'
 2) Click 'Macro >'
 3) Click 'Record new Macro...'
 4) Change the 'Store Macro in:' location from the default to 'Personal Macro Workbook'
 5) Click 'OK'
 6) Click any old place in the worksheet and type in some garbage like 'asdf' or something.
 7) Finally, click the 'Stop Recording' Macro Button.

Now there should be a 'personal.xls' visible in the Visual Basic Editor of excel. If you save your macros to here you'll have them every time you start excel. This is useful for utilities you might use such as a Julian to regular date converter or a small program to remove duplicate lines for example.