ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox Selection (https://www.excelbanter.com/excel-programming/318672-listbox-selection.html)

Todd huttenstine

Listbox Selection
 
Hey guys

I have a listbox called ListBox1 and I want to make
frame20.visible = true if any item in listbox1 is selected.


How do I do this?

Thanks
Todd Huttenstine

Harald Staff

Listbox Selection
 
Hi Todd

"How" is one side of it, "when" is another. Assuming that code or the user
selects something/nothing in the list and you want it to happen immediately:

Private Sub ListBox1_Click()
Select Case ListBox1.ListIndex
Case -1
Frame20.Visible = False
Case Else
Frame20.Visible = True
End Select
End Sub

HTH. Best wishes Harald

"Todd Huttenstine" skrev i melding
...
Hey guys

I have a listbox called ListBox1 and I want to make
frame20.visible = true if any item in listbox1 is selected.


How do I do this?

Thanks
Todd Huttenstine





All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com