Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:-
Sub imhidden() Columns("b:b").Select If Selection.EntireColumn.Hidden = True Then MsgBox ("Can't see me") Else MsgBox ("I'm visible") End If End Sub Mike "John" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
a bit neater
Sub imhidden() If Columns("b:b").Hidden = True Then MsgBox ("Can't see me") Else MsgBox ("I'm visible") End If End Sub Mike "John" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da | Excel Discussion (Misc queries) | |||
Checking Column Entries | Excel Worksheet Functions | |||
Checking a cell's (Row,Column) | Excel Programming | |||
checking for hidden columns | Excel Programming | |||
checking value in column | Excel Programming |