View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Christian Galbavy Christian Galbavy is offline
external usenet poster
 
Posts: 8
Default How to hide a column when value=1

Hy!

You can use the following code to hide columns:

If (value = 1) Then
Worksheets("Sheet1").Range("B:C").EntireColumn.Hid den = True
Else
Worksheets("Sheet1").Range("B:C").EntireColumn.Hid den = False
End If

Regards
Christian

"angeloso" schrieb im Newsbeitrag
...
Im tryng to do an interactive questionnaire, so that it would appear a
different list of questions depending on the previous answer. Therefore,
Im
trying to show only the right questions for the previous answers, hidding
the
rest of questions by hidding the column or the row in which they are
placed.
So, what do I have to do?