Hide drop downs

  • Thread starter Thread starter Alwyn
  • Start date Start date
A

Alwyn

Hi
I have drop down lists on an Excel spreadsheet. I want to hide the rows they
are on, but when selecting hide rows, all the rows will hide but one of the
drop downs will remain on the sheet. It tends to be the last dropdown or
selection control on the rows being hiden. They do not have focus at the time
of hiding, but still stay visible.

Any help would be appreciated.

Regards
Alwyn
 
Hi,
What type of combobox are you using?
It sounds like you are using the controls combobox, when you hide the rows, in fact all the comboboxes are in that one spot, not just one, is it the rows you want to hide or the combobox
this bit of code hides the combobox once you have lost focus
the other code unhides it,
Code:
Private Sub ComboBox1_LostFocus()
ComboBox1.Visible = False
End Sub

Private Sub CommandButton1_Click()
ComboBox1.Visible = True

End Sub

If you are really trying to hide rows, then maybe you should use data validation instead, alot easier to work with as well

you can hide rows with data validation

check out this link
http://www.contextures.com/xlDataVal01.html
 
Back
Top