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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top