Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default macro on tool bar

Hi,

I have a macro tied to a toolbar button, and it will operate on multiple
worksheets. If I only want it to work for just ONE specific worksheet, what
do I need to do in the code? Is there a way to load that tool bar ONLY when
that specific worksheet is selected? Or do I have to put the button on the
sheet to do that?

Thanks!

--Randy Starkey


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default macro on tool bar

Hi Randy

If it is for one workbook create your button with code when you activate the
workbook and delete it when you deactivate it

See
http://support.microsoft.com/default...b;EN-US;830502

Use this events in the thisworkbook module to run your code

Private Sub Workbook_Activate()

End Sub


Private Sub Workbook_Deactivate()

End Sub

See
http://www.cpearson.com/excel/events.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Randy Starkey" wrote in message ...
Hi,

I have a macro tied to a toolbar button, and it will operate on multiple worksheets. If I only want it to work for just ONE
specific worksheet, what do I need to do in the code? Is there a way to load that tool bar ONLY when that specific worksheet is
selected? Or do I have to put the button on the sheet to do that?

Thanks!

--Randy Starkey



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
Display Macro Recording Tool Bar claude jerry Excel Discussion (Misc queries) 1 April 26th 08 10:01 AM
excel 4.0 macro remover tool Sachin Shah Excel Discussion (Misc queries) 0 August 25th 05 04:14 AM
Goal Seek tool in a macro choboy Excel Discussion (Misc queries) 0 April 27th 05 09:22 AM
Macro & Tool Bar Sharing Juan[_3_] Excel Programming 2 February 24th 04 05:59 PM
Macro tool for solver Aidan[_3_] Excel Programming 3 January 12th 04 11:49 PM


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