Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
below code does what I think you need....
To test, paste this entire code in a commandbutton. Private Sub CommandButton1_Click() Dim LB1Vals Dim LB2Vals Dim LB3Vals With Worksheets("Worksheet Name Here").ListBox1 For LB1Vals = 0 To .ListCount - 1 If .Selected(LB1Vals) Then MsgBox "There is an item or items selected in ListBox1" 'Clears all checks from Listbox2 and Listbox3 With Worksheets("Worksheet Name Here").ListBox2 For LB2Vals = 0 To .ListCount - 1 .Selected(LB2Vals) = False Next LB2Vals End With With Worksheets("Worksheet Name Here").ListBox3 For LB3Vals = 0 To .ListCount - 1 .Selected(LB3Vals) = False Next LB3Vals End With Exit Sub Else End If Next End With MsgBox "There were no items selected in ListBox1" End Sub Todd Huttenstine |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Form/Listboxes -- problems | Excel Programming | |||
Listboxes | Excel Programming | |||
Single Selection ListBoxes | Excel Programming | |||
Linked ListBoxes | Excel Programming | |||
ListBoxes - correct syntax | Excel Programming |