Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi QV community,
is it possible to apply a different colour to a tab when the tab is activated?
Thanks for your help!
Hi Frank, you can create a variable vActiveSheet, add an action OnActivate sheet that assign a value to vActiveSheet, each sheet assigns a different value.
Then you can set custom tab color like:
Sheet1: =If(vActiveSheet=1, Red(), Green())
Sheet2: =If(vActiveSheet=2, Red(), Green())
Maybe there is a better way, but this idea can work.
Hi Frank, you can create a variable vActiveSheet, add an action OnActivate sheet that assign a value to vActiveSheet, each sheet assigns a different value.
Then you can set custom tab color like:
Sheet1: =If(vActiveSheet=1, Red(), Green())
Sheet2: =If(vActiveSheet=2, Red(), Green())
Maybe there is a better way, but this idea can work.
Thank u very much
To change a tab color whenever a sheet is moved to the front, you can use a color expression like this in Sheet Properties->General->Tab settings->Tab Color
=If(SubField(GetActiveSheetId(),'\',2) = 'SH01', white(), black())
or
=If(WildMatch(GetActiveSheetId(), '*SH01'), white(), black())
Don't forget to change the tab text color as well.
Peter
GetActiveSheetId(), that's the function I was looking for but didn't appear in help index.
Frank, I think Peter's solution is better, as you can avoid the action to set value for the variable and the variable itself.