I'm trying to design an app that removes the tabrow and replaces it with buttons of my own. Is there a best practice for setting the background and font colors through a variable? I would like to write a formula that changes the background color on the tab based on the active sheet. For example, right now I have:
If(GetActiveSheetID = 'Sht1', 'Red', 'Gray')
If(GetActiveSheetID = 'Sht2', 'Red', 'Gray')
If(GetActiveSheetID = 'Sht1', 'White', 'Black')
If(GetActiveSheetID = 'Sht2', 'White', 'Black')
(Note: will sub RBG(X,X,X) for the colors in the actual script)
Doing it this way, however, means that I have to write n formulas for n buttons. Is there a way to manage this all in one variable, potentially with the ability to query the value of the text in the text object itself? Basically, I'd like to end up with one (1) background color formula and one (1) font color formula, for n buttons. I apologize in advance if this makes no sense. Any help would be appreciated. Thanks!