ListBox MultiSelectMulti mode
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
With Blad1.Range("A1:A100")
for i = 0 to Listbox1.ListCount -1
if Listbox1.Selected(i) then
Set k = .Find(UserForm1.ListBox1.List(i,0), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByColumns)
If Not k Is Nothing Then
r = k.Row
Sheet1.Cells(r, 1).ClearContents
end if
End If
Next
End With
--
Regards,
Tom Ogilvy
"CG Rosén" wrote in message
...
Good Evening Group,
Below code works fine when my ListBox is in normal mode. But how to
rewrite
the
code to work in MultiSelectMulti mode?
Hope for your skilled assistance.
Brgds
CG Rosén
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
With Blad1.Range("A1:A100")
Set k = .Find(UserForm1.ListBox1.Text, _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByColumns)
If Not k Is Nothing Then
r = k.Row
Sheet1.Cells(r, 1).ClearContents
End If
End With
|