Toggle ListBox display?

P

Phil H.

Harold, Thanks for the encouraging response.

I've created ListBox1, put it in the header row of a spreadsheet, and want
to toggle the display of the ListBox on and off. I have numerous columns and
don't have room for a permanent display, so toggling is my answer. Toggled
on, the user can scroll down the list to find information; toggled off, the
ListBox disappears and only the toggle button remains visable.

Phil
 
H

Harald Staff

Hi Phil

Toggle button code (rightclick; "view code", or similar):

Private Sub ToggleButton1_Click()
Me.ListBox1.Visible = Me.ToggleButton1.Value
'or
'Me.ListBox1.Visible = Not (Me.ToggleButton1.Value)
End Sub

Best wishes Harald
 
P

Phil H.

Thanks, Harald - works exactly as needed.

Harald Staff said:
Hi Phil

Toggle button code (rightclick; "view code", or similar):

Private Sub ToggleButton1_Click()
Me.ListBox1.Visible = Me.ToggleButton1.Value
'or
'Me.ListBox1.Visible = Not (Me.ToggleButton1.Value)
End Sub

Best wishes Harald
 
Top