LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default script does not delete blank rows

Janis,

It seems like you missed a "."


So, replace this line

Columns("M").SpecialCells(xlCellTypeBlanks).Entire Row.Delete

With this

.Columns("M").SpecialCells(xlCellTypeBlanks).Entir eRow.Delete


--
Hope that helps.

Vergel Adriano


"Janis" wrote:

When I run this script from either the workbook where the worksheet is
located or from my personal.xls workbook it does not delete the rows that
have blank cells in column ("M"). It doesn't seem to do anything. It
compiles but it doesn't run. I still have all the rows with blank cells in
column "M" which are not needed for this report.

thanks,


Sub DeleteRows()
With ActiveSheet
On Error Resume Next
Columns("M").SpecialCells(xlCellTypeBlanks).Entire Row.Delete
On Error GoTo 0
End With
End Sub

 
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
Delete blank rows JakeShipley2008 Excel Discussion (Misc queries) 2 October 30th 08 02:18 AM
How do I delete blank rows (rows alternate data, blank, data, etc ncochrax Excel Discussion (Misc queries) 2 June 27th 07 04:40 AM
need macro script - repeat to delete 2 rows BB Excel Discussion (Misc queries) 3 November 14th 06 12:00 AM
Delete Blank rows Sige Excel Programming 8 September 27th 05 03:50 PM
Delete blank row only if 2 consecutive blank rows Amy Excel Programming 2 October 21st 04 05:24 PM


All times are GMT +1. The time now is 08:20 AM.

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

About Us

"It's about Microsoft Excel"