Hello All,
I am trying to run this code but I keep getting an error which says:
Runtime Error '5' - Invalid procedure call or argument.
While debugging I realized its because of the variable iColumn holding an incorrect value. I expect it to be 256 instead it is 16384.
Even after this observation I havent been able to debug the code shown below. Can someone help me with the problem?
Thanks
The following variables are declared constants and hold the value:
START_COLUMN_LETTER = S
COUNT = 1000
Start Row = 8
Function DeleteAllPivotTableFormats()
Dim iRow As Integer
Dim iColumn As Integer
iRow = Range(START_COLUMN_LETTER & COUNT).End(xlUp).Row
iColumn = Range(START_COLUMN_LETTER & iRow).End(xlToRight).Column
With Range(Range(START_COLUMN_LETTER & START_ROW), Range(ParseColumnNumbersToLetters(iColumn) & iRow)).ClearFormats.ClearContents
End With
End Function
Bookmarks