View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default checking if a column is hidden

Public Sub Test()
Dim cHidden As Long
Dim col As Range

cHidden = 0
For Each col In Columns("E:H").Columns
If col.Hidden Then
cHidden = cHidden + 1
End If
Next col
MsgBox cHidden & " columns are hidden"
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"John" wrote in message
...
How would i write this in VBA please. I would like to check if a
selection
of columns is hidden, then take an action depending on the circumstance.

Thanks

John