I keep on getting a "cannot add anymore custom formats" in Excel as I have too many Custom Number formats (Format, Cells, Number, Custom). I would like to create a macro using vba that will hlep me delete all the custom numbers that I do not want. Thank you.
I asked a simliar question for Styles which Combo (a member of this community) answered. I am looking for something similar to erase the number formats.
Sub DeleteUserStyles()
On Error Resume Next
With ThisWorkbook
For I = .Styles.Count To 1 Step -1
If MsgBox("Delete " & .Styles(I).Name & "?", vbYesNo, "Confirm action"
= vbYes Then
.Styles(I).Delete
End If
Next I
End With
End Sub
I asked a simliar question for Styles which Combo (a member of this community) answered. I am looking for something similar to erase the number formats.
Sub DeleteUserStyles()
On Error Resume Next
With ThisWorkbook
For I = .Styles.Count To 1 Step -1
If MsgBox("Delete " & .Styles(I).Name & "?", vbYesNo, "Confirm action"
.Styles(I).Delete
End If
Next I
End With
End Sub