I have learned that I can have tab colors change based on the value of a cell. Here's the problem - I need the cell to be one on a different tab. I have a table of contents tab called Assignments. When Tab A's work is complete I enter the date in a cell on Assignments tab that it was complete. I would love to have the tab color for Tab A to change based on if there is a date in the Assignments tab (cell E4).
Re: vba to change tab colors based on a cell value
Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your Assignments sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Enter a date in E4. Exit the cell and the tab color for "A" will change to red.
You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
Practice makes perfect. I'm very far from perfect so I'm still practising.
Re: vba to change tab colors based on a cell value
That's great! I have more than one sheet so I can add it several times and change the cell reference and sheet names to match? Also, I have a check out and check in for the assignments so D4 means teh work is out and E4 means its completed. I tried duplicating the code and changing the cell reference and color but it didn't work.
Re: vba to change tab colors based on a cell value
I think that it would be much easier to follow if I could see how your data is organized. Could you post a copy of your file? Include a detailed explanation of what you would like to do referring to specific cells and worksheets.
Re: vba to change tab colors based on a cell value
See attached for Dummy Sheet. If there is a date under out then I need the tabs to turn blue when a date is entered into the completed side I need to tab to change to green.
Bookmarks