View Single Post
  #4   Report Post  
mangesh_yadav
 
Posts: n/a
Default


Since you had mentioned a drop down list, I used the combo-box, but if
you want to use the list box instead, heres the code:


Private Sub ListBox1_Click()

Worksheets("Sheet2").Columns("B:D").EntireColumn.H idden = False

If ListBox1.Value = "test1" Then
Worksheets("Sheet2").Columns("B:B").EntireColumn.H idden = True
ElseIf ListBox1.Value = "test2" Then
Worksheets("Sheet2").Columns("C:C").EntireColumn.H idden = True
Else
Worksheets("Sheet2").Columns("D:D").EntireColumn.H idden = True
End If

End Sub



Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=379611