Delete Blank Rows when Pivot Table included on sheet
Hi,
I've run code to delete blank rows which works fine. That is, it works fine
until I'm deleting blank rows on a sheet which also contains a few pivot
tables.
I encounter an error message regarding not being able to change pivot table.
Here is my code: Thanks!
Dim x As Long
With ActiveSheet
For x = .Cells.SpecialCells(xlCellTypeLastCell).Row _
To 1 Step -1
If WorksheetFunction.CountA(.Rows(x)) = 0 Then
ActiveSheet.Rows(x).Delete
End If
Next
End With
|