Using VBA, I am trying to Clear all Formats all entire of the active Worksheet.
Dim ws As Worksheet
Set ws = ThisWorkbook.ActiveSheet
With ws
.ClearFormats
End With
But I am getting following error:

However using the same code with .UsedRange works fine as:
With .UsedRange
.ClearFormats
End With
Can you please let me know how fix this to format entire sheet!