Thread: Hiding Cells
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] Zeitlin@rocketmail.com is offline
external usenet poster
 
Posts: 1
Default Hiding Cells

I am new to VB and very frustrated. I am trying to hide columns that
represents date reporting periods based on whether the column and
particular date is outside of a range:

Private Sub CommandButton1_Click()
Dim cell As Range
Application.ScreenUpdating = False
With ActiveSheet
For Each cell In .Range("b8:bt8")
If cell.Value .Range("pop_key") Then
..cell.EntireColumn.Hidden = True
Next
End With
Application.ScreenUpdating = True
End Sub

I keep getting a runtime 1004 error on the "if cell.value" line.
v/r

PAZZ