Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How to change the color of the tab, when it is active and inactive. i.e, when someone is viewing the tab, it should be green color and if he moves away to the next tab, it should change to yellow color.
Pascal
Goto Layout,click on caption there are numerous option for active and inactive colors u can change it from there..
Hi Anwar
The one you suggested will work for objects inside the tabs. But I need to change the color of the tab itself. We set the color of the tab through
Settings-> Sheet Properties-> General-> Custom Color (Under Tab settings).
There we dont have active and inactive color. Is there any other way to do that?
Pascal
u must have caption setting tab..from there only u can change active n inactive color.
ohh..u want to change color of sheet's tab,for that u need to write macro,check in macro which sheet is open if sheet is open then assign value to variable
e.g v.SetContent "1",true and use this varible in sheet setting color scheme in calculated color.
u have to chck in macro as below
sub test
set v = ActiveDocument.Variables("var name")
if sh01 is active then
v.SetContent "1",
else
v.SetContent "2",
end if.
end sub.
and use this varible in color.
Thanks for the suggestion.
I am not good at macro. I tried the way , you suggested, but I get syntax error. It would be great, if you can explain me in detail.
I created a variable "var", but dont know , what to give in Definition.
Macro will take sometime to process,i suggest u alternate best solution:-
u can hide tabrow from document setting's tab by click on check box :hide tabrow.
And creat button in place of tabs.and then call ur sheet from these button..and color these button as per ur requirment..it is fast n easy n will definily look gud
Add this to the custom color tab in the General tab of sheet properties
IF (SUBFIELD (GETACTIVESHEETID (),'\', 2) ='SH01', GREEN (), YELLOW ())
Better:
On Scritp (or on variables overview):
SET vTabColor = IF (SUBFIELD (GETACTIVESHEETID (),'\', 2) ='$1', GREEN (), YELLOW ());
And on the custom color tab in the General tab of sheet properties you write:
$(vTabColor(SheetId))
With this solution you can change color of all sheet with one modification
Regards,
Aurélien