Using A Macro In All Workbooks

Y

Yo

Hi,

Where can I save a macro so that I can use it on any worksheet. I pull a report every month and it creates a new workbook. I need to be able to use a certain macro on each new report.

Thank you for your help.

Yosemite
 
G

Gord Dibben

You can save it in your Personal Macro Workbook......Personal.xls

or in any new workbook which you then save as an Add-in.

If you don't have a Personal.xls you can create one..........

With an existing workbook open..........

Tools>Macro>Record New Macro. Store in Personal Macro Workbook.

Record some simple steps like copying a cell and pasting it.

Hit the Stop Recording button.

You now have a Personal.xls workbook.

Hit ALT + F11 to go to the Visual Basic Editor.

CTRL + r to open project explorer.

Find Personal.xls and double-click on Module1.

Copy/paste your macro into that module.

Save Personal.xls.

Note: it can be saved Hidden so it is always available but not seen.


Gord Dibben MS Excel MVP
 
Y

Yo

Worked great! Thank you so much!!


Gord Dibben said:
You can save it in your Personal Macro Workbook......Personal.xls

or in any new workbook which you then save as an Add-in.

If you don't have a Personal.xls you can create one..........

With an existing workbook open..........

Tools>Macro>Record New Macro. Store in Personal Macro Workbook.

Record some simple steps like copying a cell and pasting it.

Hit the Stop Recording button.

You now have a Personal.xls workbook.

Hit ALT + F11 to go to the Visual Basic Editor.

CTRL + r to open project explorer.

Find Personal.xls and double-click on Module1.

Copy/paste your macro into that module.

Save Personal.xls.

Note: it can be saved Hidden so it is always available but not seen.


Gord Dibben MS Excel MVP
 
Top