Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 208
Default 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   Report Post  
Posted to microsoft.public.excel.misc
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).


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 208
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
workbook linking cells not working within a workbook martyn Excel Discussion (Misc queries) 1 November 3rd 06 12:11 PM
Very large complex workbook is now giving me the wrong results :( S Davis Excel Worksheet Functions 0 July 17th 06 09:00 PM
Linking Master Workbook & subordinate workbook Lucky_guy2000 Excel Discussion (Misc queries) 1 July 14th 06 10:43 PM
Whats wrong with this macro please Mike Excel Discussion (Misc queries) 6 February 5th 06 09:31 PM
macro results wrong Joseph Tibiita Charts and Charting in Excel 2 June 30th 05 05:32 PM


All times are GMT +1. The time now is 08:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"