Thread: Simple Macro?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob Edwards Rob Edwards is offline
external usenet poster
 
Posts: 17
Default Simple Macro?

Use the followig...

Sub RemoveRow()
Range("B2:B30").Select
Do Until ActiveCell = ""
If ActiveCell.Value = 0 Then
ActiveCell.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub

Your version was ending as the Do Until was waiting for the value 0.

Rob Edwards

Always look on the bright side of life!

*** Sent via Developersdex http://www.developersdex.com ***