PDA

View Full Version : Macro Toolbar, disable buttons



ioncila
03-20-2009, 04:09 PM
Hi
I created a toolbar that calls all the macros in a workbook. This toolbar appears in all activesheets because all sheets in this workbook have macros to run.

My question is:

Is there a way to disable (or hide) macro buttons of the toolbar if their macros dont belong to the activesheet (this to prevent execute macros from another sheets)?

I would aprecciate some help

Thank you very much

GTO
03-20-2009, 04:20 PM
Greetings ioncila,

I believe that should be fairly easy to accomplish, either thru the sheet(s)' activate/deactivate events, or the workbook's sheet activate/deactivate events.

I would suggest attaching an example workbook (stripped of any private/sensitive info) as this would make it easier for anyone to answer, rather than having to guess and create an example.

Mark

GTO
03-20-2009, 07:03 PM
http://www.mrexcel.com/forum/showthread.php?t=379066

lucas
03-20-2009, 09:03 PM
ioncila, Please read this before you post here again on why it is important to provide a link when you post in several forums with the same question:

http://www.excelguru.ca/node/7