Automate Tab Color

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello-

I'd like to make a macro that changes all tabs to red when the file is Saved
As somethings else. Once they are "reset" in a save as mode, they are free
to be changed manually, I just would like to have a script that defaults a
new file to red tabs.

Does anyone on this list have any suggestions of a short script?

regards,
-b o b
 
Add code to thisworkbook page in VBA window

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)

For Each ws In Sheets
Sheets(ws.Name).Tab.ColorIndex = 3
Next ws
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top