Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default assign macro to active workbook??

I have 6 instances of a spreadhseet for different sites. they all have the
same toolbars created and every time you open one it imports the toolbars and
every time you close one it deletes the toolbars. This works good if you
only have one sheet open at a time, but if you have 2 open at the same time
the first one open has the toolbar that refers to that workbook. if you
close thefirst sheet the toolbar stays and the buttons refer to the now
closed wrkbook and if you click one of the buttons it reopends that work book.

Is there a way to have the macros assigned to the buttons as activeworkbook,
instead of the workbook name?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default assign macro to active workbook??

How about an alternative suggestion.

Remove all the code from each of these workbooks.

Create a new workbook with all this code and save it as an addin. Tell the
users to open this addin each time they need to use one of those macros.

By having only one workbook/addin with the code, it should be easier to update
when things change, too.

Kevin wrote:

I have 6 instances of a spreadhseet for different sites. they all have the
same toolbars created and every time you open one it imports the toolbars and
every time you close one it deletes the toolbars. This works good if you
only have one sheet open at a time, but if you have 2 open at the same time
the first one open has the toolbar that refers to that workbook. if you
close thefirst sheet the toolbar stays and the buttons refer to the now
closed wrkbook and if you click one of the buttons it reopends that work book.

Is there a way to have the macros assigned to the buttons as activeworkbook,
instead of the workbook name?


--

Dave Peterson
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
Macro to copy active worksheet to new workbook Macca Excel Discussion (Misc queries) 1 May 25th 08 02:07 PM
Assign macro name to menu command w/o using workbook name Blight_Pete Excel Discussion (Misc queries) 0 August 3rd 06 10:48 PM
How can i attach active workbook to email- please see the macro stric[_3_] Excel Programming 1 July 14th 05 10:19 PM
Macro to assign a printer to a workbook Gordon Forbes Excel Programming 6 February 25th 04 10:00 AM
run a macro on an in-active workbook jfeka[_2_] Excel Programming 4 July 19th 03 03:49 PM


All times are GMT +1. The time now is 10:04 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"