how do i get a ckd list control to work...
i.e. should i b using the ItemData(1) value = 0 type thing or not...
tnx u
i.e. should i b using the ItemData(1) value = 0 type thing or not...
tnx u
You could create an OnClick event for the option button to deselect it if it's already selected. e.g. in the OnClick event, say "If optWhatever.Value Then optWhatever.Value = False"who on gods green earth thought it was clever to not allow an option button command to not be deselected....
If you use a ListView, then you can do this:what i would desperately like to know is how do i get vb to recognise what has been selected from the list (of poss over 100 items) without doing a hundred or so SelectCase .... Case 0, case 1 commands....
Substitute l.Selected if you're using MultiSelect instead of Checkboxes.code:<HR>Code:Dim l as ListItem For Each l in lvwMyListView.ListItems If l.Checked Then ...... End If Next
Originally posted by Thanatos22:
Actually I cannot think of a single good reason to use the standard listbox over a listview...
code:<HR>Code:Private Sub Form_Load() Dim NewItem As ListItem Dim i As Integer ListView1.ListItems.Clear ListView1.View = lvwReport ListView1.MultiSelect = True ListView1.Checkboxes = True ListView1.ColumnHeaders.Add , , "i" ListView1.ColumnHeaders.Add , , "i+1" For i = 1 To 10 Set NewItem = ListView1.ListItems.Add(, "i" & Trim(Str(i)), Str(i)) NewItem.SubItems(1) = Str(i + 1) Next End Sub