Multiselection Listbox - Selection to list in Msgbox

Tlev

New Member
Joined
Sep 22, 2009
Messages
3
Hi everyone,

I've set up two list boxes in an "add>" and "Remve<remov><remove></remove></remov>"<remove></remove> configuration with the option of multiples selections.

After the user has populated Listbox2 with all or some of the items from listbox1 and upon them pressing a "proceed" button, I am trying to get a please confirm msgbox to pop up in which the selection listed therein.

I can only manage to get the confirm popup to loop with a single item from the selection at a time.

What I am actually trying to get is a stacked list of all the selected items in a one off single popup. Is it possible?? Any Ideas..I'm an absolute novice.

Here is my script:
Private Sub CommandButton2_Click()
Dim t As Integer

If ListBox2.ListIndex = -1 Then
If MsgBox("You havent selected anything", vbInformation, "BLANK") = vbOK Then Exit Sub

Else

If MsgBox("You are going to add the following Components:" & vbNewLine & ListBox2.List(t), vbYesNo, "") = vbNo Then Exit Sub
For t = 0 To UserForm1.ListBox2.ListCount - 1
ActiveSheet.Range("N10").End(xlUp).Offset(1, 0).Value = ListBox2.List(t)
Next t

End If
Unload UserForm1
End Sub
Cheers
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top