I have script I created that creates a new sheet, and a new tab in said sheet, before changing the names of said tabs, I want to make it so Sheet1 through Sheet4 all are red.
With wbBK2.Sheets(wsWS1).Tab
.Color = 255
End With
Now the code above works for individual tabs, but I am wondering is there a way to change all four tabs at the same time using Excel VBA?
Try something like this:
Dim Sht As Worksheet
For Each Sht In Application.Worksheets
With Sht.Tab
.Color = 255
End With
Next Sht
Note:
I think you may be able to change Application.Worksheets
to wbBK2.Worksheets
, but I'm running too low on caffeine to remember, or time to test it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With