Toggle ListBox display?

  • Thread starter Thread starter Phil H.
  • Start date Start date
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
 
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
 
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
 

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

Similar Threads


Back
Top