View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Kevin B Kevin B is offline
external usenet poster
 
Posts: 1,316
Default Macro linking to wrong workbook

You can put the macros you need in a personal macro workbook, which will
open in the background each time you start Excel, making those macros
available to any workbook.

Or you can create a template file and move the data into your template each
month.

--
Kevin Backmann


"Tim879" wrote:

I have a monthly process where each month I get a new report. In order
to calculate the numbers I need, I open the prior month file and copy
the tabs lookups / pivots I need.

I have macros stored within those tabs to update the pivots and run
selected filters.

In order to run the pivots, I created command buttons on the pivot tab
assigned to run each macro.

The issue I am having is once I move the tabs into the new workbook,
the command buttons try to run the macros from the prior month file
and not the current month file.

I know how to correct this by reassigning the buttons but it's
annoying to have to do this every month.

Any suggestions on how to have the buttons simply refer to the macros
in the current workbook? One other complication, other people use this
file as well so I cannot store the macros in my personal macro
workbook since they won't be able to access them.

(If it matters at all, the macros are actually stored within the sheet
as opposed to a module in the workbook).