![]() If Not lstCriteria.Selected(i) Then lstSelected = False Else lstSelected = True If lstSelected = False Then NoItemsList = NoItemsList & chkProject.Caption & vbCrLf ![]() If Not lstProject.Selected(i) Then lstSelected = False Else lstSelected = True If lstSelected = False Then NoItemsList = NoItemsList & chkValidation.Caption & vbCrLf If Not lstValidation.Selected(i) Then lstSelected = False Else lstSelected = True If lstSelected = False Then NoItemsList = NoItemsList & chkStudy.Caption & vbCrLf If Not lstStudy.Selected(i) Then lstSelected = False Else lstSelected = True If lstSelected = False Then NoItemsList = NoItemsList & chkSponsor.Caption & vbCrLf If Not lstSponsor.Selected(i) Then lstSelected = False Else lstSelected = True I guess I'm just going to have to stick with what I have: MsgBox "Tick, list = " & lstStudy.ListIndex If chkStudy And Not (lstStudy.ListIndex >= 0) Then If Not (chkStudy) And Not (lstStudy.ListIndex >= 0) Then MsgBox "Tick, List = " & lstStudy.ListIndex If chkStudy And lstStudy.ListIndex >= 0 Then MsgBox "No Tick, List = " & lstStudy.ListIndex If Not (chkStudy) And lstStudy.ListIndex >= 0 Then Still won't do what I need it to.:think:Īnd I tried that with Malcom's userform with the following code: this forces the user's hand in a sense, but prevents you from having to write a bunch of code to deal with user errors. ![]() The other way around this issue is to have something selected in the listbox when loaded Public Sub Userform_Activate()Įnd Sub will select the first item in the listbox upon activation.
0 Comments
Leave a Reply. |