Sub ChangeTabColor()
Dim wb As Workbook
Dim sh As Worksheet
Dim newSheetName As String
newSheetName = "My New Sheet"
Dim fPath As String
fPath = "C:\Users\Desktop\myfile.xlsx"
Set wb = workbooks.Open(Filename:=fPath)
' delete first worksheet
Set sh = wb.Worksheets(1)
' refer the color indexes and actual colors
' in the below image
sh.Tab.ColorIndex = 1
' you can also use RGB format for defining the color code
sh.Tab.Color = RGB(255, 0, 300)
End Sub
VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts