Sub Macro9()
'This code is to add tab color to all worksheet
    On Error Resume Next
    For Each ws In Worksheets
        ws.Tab.ColorIndex = 50
    Next
End Sub

Sub Macro10()
'This code is to add tab color to current worksheet
    On Error Resume Next
    ActiveSheet.Tab.ColorIndex = 50
End Sub