Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro linking to wrong workbook
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). |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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). |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro linking to wrong workbook
The latter solution may work but it would require a good deal of work
on my end as the monthly file I receive is already linked to other files so I'm not quite sure creating a template would be worth it. also the personal macro work book would work for me but not other people who need to access the macros. I'm just surprised that I can't find a way to tell the button to run the selected macro from the current workbook. On Aug 30, 4:46 pm, Kevin B wrote: 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). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
workbook linking cells not working within a workbook | Excel Discussion (Misc queries) | |||
Very large complex workbook is now giving me the wrong results :( | Excel Worksheet Functions | |||
Linking Master Workbook & subordinate workbook | Excel Discussion (Misc queries) | |||
Whats wrong with this macro please | Excel Discussion (Misc queries) | |||
macro results wrong | Charts and Charting in Excel |