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:
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
CheersDim 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