Hiding Combo Boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible for me to create a macro so that when I click a button, a
combo box is hidden?

I'm using Excel 2007 and Vista Home Premium if that helps

Thanks
 
It'll depend on what kind of button and what kind of combobox.

It could be as simple as:

Option Explicit
Private Sub CommandButton1_Click()
With Me.ComboBox1
.Visible = Not .Visible
End With
End Sub

This actually toggles the visibility.

If you just want to hide it, use this line:

.Visible = false
 

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

Back
Top