J
Joe2007
Hi, Faisal. I have one more question. When I protect the sheet, most of it
anyway except quantities and discount, then I run this macro. I come up with
an error on the line below. Any thoughts?
___________For Each cell In rng_____________________
Private Sub CommandButton5_Click()
Application.ScreenUpdating = False
Dim cell As Range, rng As Range
Cells.Rows.Hidden = False
On Error Resume Next
Set rng = Columns(2).SpecialCells(xlConstants, xlNumbers)
On Error GoTo 0
For Each cell In rng
If cell.Value = 0 Then
cell.EntireRow.Hidden = True
End If
Next
Application.ScreenUpdating = True
End Sub
Why should I rate a post?
anyway except quantities and discount, then I run this macro. I come up with
an error on the line below. Any thoughts?
___________For Each cell In rng_____________________
Private Sub CommandButton5_Click()
Application.ScreenUpdating = False
Dim cell As Range, rng As Range
Cells.Rows.Hidden = False
On Error Resume Next
Set rng = Columns(2).SpecialCells(xlConstants, xlNumbers)
On Error GoTo 0
For Each cell In rng
If cell.Value = 0 Then
cell.EntireRow.Hidden = True
End If
Next
Application.ScreenUpdating = True
End Sub
Was this post helpful to you?Faisal... said:Hi Joel
Thanks. It depends on the type of macro. Things like flicking
between sheets or with userforms (in between these two commands) may
not work. Then ofcourse you can use more of these lines.
Faisal...
Why should I rate a post?