I have the following code to list all worksheet names and their corresponding tab colors, it seems to work fine EXCEPT where the tab has no color in which case it shows as black. cna anyone suggest what i am doing wrong?
Many Thanks
Cheers, Craig
Si fractum non sit, noli id reficere
Many Thanks
Code:
Sub ListWorkSheetNamesAndTabColors()
Set wks = Sheets("SheetList")
wks.Columns("A:B").EntireColumn.Delete
For i = 1 To Sheets.Count
wks.Range("$A$1").Value = "SheetName"
wks.Range("$B$1").Value = "TabColour"
wks.Range("A" & i + 1) = Sheets(i).Name
wks.Range("B" & i + 1).Interior.Color = Sheets(i).Tab.Color
Next i
End Sub
Cheers, Craig
Si fractum non sit, noli id reficere