Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to create a dynamic color tab ?

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,

6 Replies
Anonymous
Not applicable
Author

you can try it with change----- default color in active and inactive tab under option --"caption"

MayilVahanan

HI

PFA

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

No macro needed, use conditional tab color (sheet properties), here is an example:

if(wildmatch(GetActiveSheetId(),'*SH01'), blue(), red())

Regards,

Michael

Not applicable
Author

Thanks a lot.

It's very great!!

Not applicable
Author

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.

rustyfishbones
Master II
Master II

Hi Judikael,

Here is a video that shows 8 different ways in which this can be done

http://youtu.be/g1vIwNx8DMQ

It includes Michael's answer too!! thanks Michael