Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I want to create a dynamic color tab.
I would have to have a tab in my help tab (Red on White) and the second tab is classic (grey/black).
Then when I click on the second tab my color of tab is (Red on white).
how can do it with variables or macro ?
Thanks,
you can try it with change----- default color in active and inactive tab under option --"caption"
HI
PFA
No macro needed, use conditional tab color (sheet properties), here is an example:
if(wildmatch(GetActiveSheetId(),'*SH01'), blue(), red())
Regards,
Michael
Thanks a lot.
It's very great!!
Declare a New Variable in Variable overview as 'ActiveSheet'
SUB SET_ActiveSheet
Write A Macro
SUB SET_ActiveSheet
if ActiveDocument.Sheets(1).IsActive then
ActiveDocument.Variables("ActiveSheet").SetContent "Sheet2", true
else if ActiveDocument.Sheets(2).IsActive then
ActiveDocument.Variables("ActiveSheet").SetContent "Sheet3", true
------
------
END IF
Call this Macro SUB SET_ActiveSheet In Each Sheets
Set Each sheet
Tab colour as calulated and set =IF ( ActiveSheet = 'Sheet1' , RGB(33,84,115)) then
=IF ( ActiveSheet = 'Sheet2' , RGB(33,84,115))...etc for each sheet
So According to selection Active Tab colour wil get chnaged.
Hi Judikael,
Here is a video that shows 8 different ways in which this can be done
It includes Michael's answer too!! thanks Michael