LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table - with blank rows ColG Excel Discussion (Misc queries) 6 March 18th 09 04:12 PM
Pivot Table blank rows Mostachon Excel Discussion (Misc queries) 1 September 5th 08 06:36 PM
delete all blank rows in a table marcia2026 Excel Programming 2 July 12th 08 01:01 AM
Delete all Blank Rows from data table Shazi Excel Programming 3 June 25th 08 10:19 PM
Macro to look for blank rows in sheet, delete the row and autofit JDerm Excel Programming 1 May 13th 04 07:08 PM


All times are GMT +1. The time now is 12:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"