You can use getvisible to do this
Download the example workbook from my site
You can run the code with the activate/deactivate event of the sheets
http://www.rondebruin.nl/ribbon.htm
See point 3
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Joergen Bondesen" wrote in message ...
Hi NG.
I have this code for my personal ribbon tabs and it works fine:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
<ribbon
<tabs
<tab id="MyCustomTab" label="VBA" insertAfterMso="TabHome"
<group id="customGroup1" label="jbs"
<button id="customButton1" label="Ajust Cells" size="large"
onAction="Macro1" imageMso="AccessTableEvents" /
<button id="customButton2" label="Find Letter" size="large"
onAction="Macro2" imageMso="BevelTextGallery" /
<button id="customButton3" label="Bad Hyberlinks" size="large"
onAction="Macro3" imageMso="HyperlinkInsert" /
</group
</tab
</tabs
</ribbon
</customUI
I have 3 sheets in my file and when sheet 2 and 3 is selected, I want the
tab to be hidden.
What must i add to my code before generate Callbacks and maybe further add
in my vba.
Best regards from
Joergen Bondesen
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4135 (20090606) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com