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" <(E-Mail Removed)> wrote in message
news:3DDF84D0-E867-423E-AFD4-(E-Mail Removed)...
> 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
>
|