hide excel sheets

S

Sunil Sagar

I want to hide worksheet in excel worksheet using combo-box.
This combobox has got 2 options : "YES" and "NO"

For "NO" this will hide the worksheet and vice versa.

Please help, how it can be configured.
Sunil
 
M

Mike H

Hi,

Try this, the text for 'Yes

Private Sub ComboBox1_Click()
If UCase(ComboBox1.Text) = "YES" Then
Sheets("Sheet1").Visible = False
Else
Sheets("Sheet1").Visible = True
End If
End Sub

Mike
 
Top