Hi Sidd,
try this one, although it loops all the styles. This code would delete all the non-built styles.
Code:Sub RemoveStyles() Dim i As Long Dim c As Long With ThisWorkbook c = .Styles.Count For i = 1 To c If Not .Styles(i).BuiltIn Then .Styles(i).Locked = False .Styles(i).Delete End If Next End With End Sub




Reply With Quote
Bookmarks