Assuming that Listbox1 and Listbox2 are both configured to allow 1 column
only, try something like the following untested air code to set Listbox2 to
have those items selected in Listbox1:
Dim strRowSource As String
Dim varSelected As Variant
For Each varSelected In Me.Listbox1.ItemsSelected
strRowSource = strRowSource & _
Me.Listbox1.ItemData(varSelected) & ";"
Next varSelected
If Len(strRowSource) > 0 Then
strRowSource = Left(strRowSource, Len(strRowSouce)-1)
End If
What line is it complaining about? Since I'm not using a method named Item
anywhere in that code, nor am I addressing the Forms collection anywhere, I
somehow suspect it's complaining about something else in your code.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.