Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
G'Day all,
I have a quick question. In a worksheet I have a column which sometimes is hidden. How do I use a macro to detect if the column is hidden or not? Any help would be much appreciated. Thanks Jas |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Public Sub IsItHidden() MsgBox IIf(Columns(3).Hidden, "", "Not ") & "Hidden" End Sub Change column number to suit. In article , Ashman wrote: G'Day all, I have a quick question. In a worksheet I have a column which sometimes is hidden. How do I use a macro to detect if the column is hidden or not? Any help would be much appreciated. Thanks Jas |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the help, but it did not work.
What I am trying to do if run an if statement, ie if the column is hidden then run a procedure, if it is false, then run a different procedure. The start of the if statement i would like to use, is: sheets("money in").column(lastbank+2) Can you help with this? Jason "JE McGimpsey" wrote: One way: Public Sub IsItHidden() MsgBox IIf(Columns(3).Hidden, "", "Not ") & "Hidden" End Sub Change column number to suit. In article , Ashman wrote: G'Day all, I have a quick question. In a worksheet I have a column which sometimes is hidden. How do I use a macro to detect if the column is hidden or not? Any help would be much appreciated. Thanks Jas |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What "didn't work"?
OTOH, it helps to explain what you're trying to do. Try something like: If Sheets("money in").Columns(lastbank + 2).Hidden Then Proc1 Else Proc2 End If Note that you need to use the ColumnS collection, not the Column property. In article , Ashman wrote: Thanks for the help, but it did not work. What I am trying to do if run an if statement, ie if the column is hidden then run a procedure, if it is false, then run a different procedure. The start of the if statement i would like to use, is: sheets("money in").column(lastbank+2) Can you help with this? Jason "JE McGimpsey" wrote: One way: Public Sub IsItHidden() MsgBox IIf(Columns(3).Hidden, "", "Not ") & "Hidden" End Sub Change column number to suit. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Many thanks, it worked perfectly.
Jas "JE McGimpsey" wrote: What "didn't work"? OTOH, it helps to explain what you're trying to do. Try something like: If Sheets("money in").Columns(lastbank + 2).Hidden Then Proc1 Else Proc2 End If Note that you need to use the ColumnS collection, not the Column property. In article , Ashman wrote: Thanks for the help, but it did not work. What I am trying to do if run an if statement, ie if the column is hidden then run a procedure, if it is false, then run a different procedure. The start of the if statement i would like to use, is: sheets("money in").column(lastbank+2) Can you help with this? Jason "JE McGimpsey" wrote: One way: Public Sub IsItHidden() MsgBox IIf(Columns(3).Hidden, "", "Not ") & "Hidden" End Sub Change column number to suit. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
getting rid of a hidden column behind the front column | Excel Discussion (Misc queries) | |||
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da | Excel Discussion (Misc queries) | |||
Hidden column | Excel Discussion (Misc queries) | |||
Getting column width of a hidden column? | Excel Programming | |||
Hidden Column in VBA | Excel Programming |