Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Toolbars that only show up for a given worksheet.

I keep macros specific to a given worksheet inside the worksheet (not
in PERSONAL.XLS.

I like to associate those macros to toolbar buttons. So far my
toolbars end up globa (all workbooks can see them, even when the
toolbar (and its associated functions) has nothing to do w/ the
particular worksheet.

How can I associate toolbars (along w/ its assigned macros) to a
specific workbook.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Toolbars that only show up for a given worksheet.

You could take the easy way out and have each of the subs in your workbook check
to see if the activeworkbook is one that should be able to run the code.

if thisworkbook.name < activeworkbook.name then
msgbox "Nope"
exit sub
end if

at the top of each of your subs.

========
Another option would be to destroy the toolbar each time you deactivate the
workbook and recreate it each time you activate the workbook.

You'd use the workbook_activate event and the workbook_deactivate event.

I would think that the code would look very similar to the code you use in the
workbook_Open and workbook_beforeclose (or auto_open and auto_close) events.

livetohike wrote:

I keep macros specific to a given worksheet inside the worksheet (not
in PERSONAL.XLS.

I like to associate those macros to toolbar buttons. So far my
toolbars end up globa (all workbooks can see them, even when the
toolbar (and its associated functions) has nothing to do w/ the
particular worksheet.

How can I associate toolbars (along w/ its assigned macros) to a
specific workbook.

Thanks


--

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
how do i sort a worksheet data to show repetitve data and show mrcheatherington Excel Worksheet Functions 1 December 30th 07 02:26 PM
How to show watermark in each worksheet? iampritzy Setting up and Configuration of Excel 0 August 4th 06 06:00 PM
Show no toolbars in specific book michaelberrier Excel Discussion (Misc queries) 8 June 19th 06 10:34 PM
How do I hide and show all toolbars Quinam Excel Worksheet Functions 1 April 12th 05 04:11 PM
Hide/show worksheet Mal Excel Discussion (Misc queries) 5 March 29th 05 04:00 PM


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