greyfish
04-05-06, 12:10 PM
Sub deleteemptyrow()
YesNo = MsgBox("Delete Empty Row")
Select Case YesNo
Case vbYes
Rng = Selection.Row.Count
AcitveCell.Offset(0, 0).Select
Application.ScreenUpdating = False
For i = 1 To Rng
If ActiveCell.Value = "0" Then
Selection.EntireRow.Delete
Else
Case vbNo
ActiveCell.Offset(1, 0).Select
End If
Next i
Application.ScreenUpdating = True
End Select
End Sub
Could Someone please tell me how to debug this..I know the syntax is wrong somehow but i keep tweaking it and it's not working....thanks!!!!
YesNo = MsgBox("Delete Empty Row")
Select Case YesNo
Case vbYes
Rng = Selection.Row.Count
AcitveCell.Offset(0, 0).Select
Application.ScreenUpdating = False
For i = 1 To Rng
If ActiveCell.Value = "0" Then
Selection.EntireRow.Delete
Else
Case vbNo
ActiveCell.Offset(1, 0).Select
End If
Next i
Application.ScreenUpdating = True
End Select
End Sub
Could Someone please tell me how to debug this..I know the syntax is wrong somehow but i keep tweaking it and it's not working....thanks!!!!