Copying Listbox1 items to a Userform1 Textbox1

chazrab

Well-known Member
Joined
Oct 21, 2006
Messages
884
Office Version
  1. 365
Platform
  1. Windows
My userform has Listbox1 and Textbox1. When the form is run, clicking on the Copy Next 5 button adds the
next 5 Listbox1 items to Textbox1 below the previous 5 and so on.
The items are saved in the underlying Sheet2 beginning in Col. H with Row 2.
I can only seem to get this far:
Code:
 (clickng Copy button:
Me.TextBox1.Value = Me.TextBox1.Value + Sheets("Sheet2").Cells(2, 7).Value 'copies 1 value
or, using the Listbox1 Change Event:
Private Sub ListBox1_Change()
UserForm1.TextBox1 = UserForm1.ListBox1.List(UserForm1.ListBox1.ListIndex, 2)  + add(concantenate?)
the next item
End Sub
I can't figure out how to add a multiple selection of the next 5 items to Textbox1.
Can someone please help me with this.

Thanks for all your help.
cr
COPYFIRST5ITEMS.jpg
NEXT5ITEMS.jpg
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,214,877
Messages
6,122,051
Members
449,064
Latest member
scottdog129

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