I have searched whole web looking for answers. Hopefully someone can help me out here.
I want the client to be able to click on any cell in Column "R" so the list box will pop out and the client can make multiple selections, hit Save and the cell populates with those values. If there are couple values I want them as a column. Note: Not separated with ",". Also, I need the message displayed when choosing multiple selections "Hold "Ctrl" key for multiple selections".
1) I Have a list box with multiple selections and button "save"
2) The code I have is from this forum as well slightly modified to my specs
3) The code is in UserForm1 inside the CommandButton "Save". It works but only when I debug and it populates multiple cells when I select multiple values from the ListBox "lbxOfferType"
Please, Help![Frown :( :(](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Thank you in advance!
I want the client to be able to click on any cell in Column "R" so the list box will pop out and the client can make multiple selections, hit Save and the cell populates with those values. If there are couple values I want them as a column. Note: Not separated with ",". Also, I need the message displayed when choosing multiple selections "Hold "Ctrl" key for multiple selections".
1) I Have a list box with multiple selections and button "save"
2) The code I have is from this forum as well slightly modified to my specs
VBA Code:
Private Sub Save_Click()
Dim I As Long
Dim b As Long
Dim last row As Long
last row = Cells(Row.Count, "R").End(xlUp).Row
For I = o To lbxOfferType.ListCount - 1
If lbxOfferType.Selected(i) True = Then
Cells(lastrow + 1, "R") = lbxOfferType.List(i)
last row = last row + 1
End If
Next
For b = 0 To lbxOfferType.ListCount - 1
If lbxOfferType.Selected(b) = True Then lbxOfferType.Selected(b) = False
Next
End Sub
3) The code is in UserForm1 inside the CommandButton "Save". It works but only when I debug and it populates multiple cells when I select multiple values from the ListBox "lbxOfferType"
Please, Help
Thank you in advance!
Last edited by a moderator: