If you want the items selected, call something like this on each lstbox
click event:
Public Sub Add()
Dim frm As Form, ctl As listbox
Dim varItm As Variant
Set frm = Forms!YourformName
Set ctl = frm!YourlstboxName
' loops thru lstbox to get total selected
For Each varItm In ctl.ItemsSelected
C = C + CSng(ctl.Column(1, varItm)) 'this example just adds the
numbers in columns 1
W = W + CSng(ctl.Column(2, varItm)) 'same as above for column 2
Next varItm
Set ctl = Nothing
Set frm = Nothing
'puts values in textboxes
Me.txtC = C
Me!txtInUse = W
End Sub
Damon
> Short and crisp question:
>
[quoted text clipped - 7 lines]
> ------= Binary Usenet downloading made easy =---------
> -= Get GrabIt for free from http://www.shemes.com/ =-
Thanks a lot for that. But I am asking after multiselect handling in a listVIEW not a listBOX. The method you describe is not available for listviews.
regards, Jos
AccessVandal - 05 Jul 2007 10:19 GMT
Hi,
Something like....
Dim ctl As MSComctlLib.ListItem
For Each ctl In Me.ctlListView.ListItems
If ctl.Selected Then
MsgBox "Row is Selected " & ctl.Value
End If
Next ctl
End Sub
>Thanks a lot for that. But I am asking after multiselect handling in a listVIEW not a listBOX. The method you describe is not available for listviews.
>regards, Jos

Signature
Please Rate the posting if helps you