Not linking a macro to a specific workbook

t8jones8
04-18-2008, 07:47 AM
I have created a few Macros but they are linked to the workbook. So stupid question, but how do I make it so that ANY time I open a workbook, the code can be run but not be directly linked to to a workbook. In other words, every month I receive a new workbook and I want to run a macro to clear a bunch of cells out (which works) but it always goes back to the original workbook.

Is there a place all my code should be? I have 2 macros saved in the toolbar and I wan to open ANY sheet and us the macro?



Please post Excel questions, in the Excel forum.

Thank you.

Heyjoe
04-18-2008, 09:37 AM
Use the macro recorder to record a new macro.
Go to tools macro, record new macro.
In the box that comes up where it says record macro in - use the drop down box to say Personal Macro Workbook.
Save your macro.

Open any workbook.
Go to Tools Macro. Make sure where it says macros in that you show either all open workbooks or personal.xls.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum