here is what I have right now and what I am wanting the code to do...
I have a list box that is shown (on a separate popup form) and it gets populated from a table once this command button is clicked:
after being clicked, the popup form is shown and the listbox gets populated from data on a worksheet. ("Sheet6" , "Table1" )
then the user makes whatever selections from the listbox:
and that's the extent of what I have...
from here, what I would like the code to do is to populate a text box back that is back on the main userform from the choices that were just selected from the listbox.
Preferably, the selected choices would be shown like this where they are separated by a comma:
my Code right now only does this:
After clicking on the command button in the first pic, the popup form is shown:
And on the popup form the listbox is populated from a table on a worksheet:
Getting the choices that were made back onto the main userform (name: frmReportCriteria), and then to populate the textbox (name: txtCustomer),,, I cant figure out.
Any help or other suggestions (if what I am explaining cant be done), would be appreciated. Thank you.
I have a list box that is shown (on a separate popup form) and it gets populated from a table once this command button is clicked:
after being clicked, the popup form is shown and the listbox gets populated from data on a worksheet. ("Sheet6" , "Table1" )
then the user makes whatever selections from the listbox:
and that's the extent of what I have...
from here, what I would like the code to do is to populate a text box back that is back on the main userform from the choices that were just selected from the listbox.
Preferably, the selected choices would be shown like this where they are separated by a comma:
my Code right now only does this:
After clicking on the command button in the first pic, the popup form is shown:
VBA Code:
Private Sub cmdShowCustomers_Click()
frmShowCustomers.Show
End Sub
VBA Code:
Private Sub UserForm_Initialize()
'
Dim ws As Worksheet
Set ws = Worksheets("LookupLists")
'******************
Dim xCus As Range
''*******************************************************************************************************
lstCustomer.List = Sheet6.ListObjects("Table1").DataBodyRange.Value2
lstCustomer.ColumnCount = 2
'
End Sub
Getting the choices that were made back onto the main userform (name: frmReportCriteria), and then to populate the textbox (name: txtCustomer),,, I cant figure out.
Any help or other suggestions (if what I am explaining cant be done), would be appreciated. Thank you.