Remove custom styles in Excel using vba (also bring back default styles if missing)

Sub TrimStyles()
Dim s As Variant
Dim g As Style
On Error Resume Next
With ActiveWorkbook
For Each g In .Styles
If g.BuiltIn = False Then
s = g.Value
.Styles(s).Delete
End If
Next g
On Error GoTo 0
End With
End Sub

If still cannot delete some custom styles, use steps below
1. open excel file with unzip program such as winzip, winrar.
2. go to folder xl then open styles.xml with a text editor program such as notepad.
3. search for "cellStyles" then delete the unwanted custom styles. (Also search for "cellstyle" if "cellStyles" not found)
4. search  customBuiltin="1" for default styles and change "1" to "0" in case you want to delete the custom changes on default styles.