Thread: Hidden Column
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ashman Ashman is offline
external usenet poster
 
Posts: 35
Default Hidden Column

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.