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: 20
Default Simple Macro?

Why does the following macro jump to End Sub after it encountered the first
cell with 0 (zero) value instead of deleting the entire row?

Values to be tested are in column B

Sub RemoveRow()
Range("B2:B30").Select
Do Until ActiveCell.Value = 0
If ActiveCell.Value = 0 Then
ActiveCell.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
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
Simple macro MikeD1224 Excel Discussion (Misc queries) 1 June 9th 07 12:06 AM
Simple Macro steph44haf Excel Programming 1 July 28th 06 10:24 PM
Simple macro help chip_pyp Excel Discussion (Misc queries) 3 January 10th 06 07:57 PM
Simple Macro Help Adam :: Oregon, USA Excel Programming 5 October 22nd 04 12:18 AM
Simple help with macro please Brian Tozer Excel Programming 4 December 26th 03 06:45 PM


All times are GMT +1. The time now is 10:24 PM.

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"