LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Copy from one box to another on a user form

Make sure you set your multiselect option to select multiple or extended,
then put this in the buttons click event.

For i = 0 To ListBox1.ListCount - 1
On Error Resume Next
If ListBox1.Selected(i) = True Then
ListBox2.AddItem ListBox1.List(i)
End If
Next i

--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"JLR-Mart" wrote:

Please can someone help. I have a user form with two list boxes on it. One on
the left and one on the right. The LH box has a list of choices and the RH
box is empty. I want a user to highlight a choice or choices in the left box
and by clicking a button with an arrow on it pointing to the RH box it will
populate the RH box with this choice. Having created a list of choices in the
RH box I then want to create a space seperated string of these choices.

Anyone done something similar before?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use VBA to copy User Form from 1 workbook to another? MikeZz Excel Programming 29 September 24th 09 11:36 PM
Copy or Print from User Form? Shelly Excel Programming 2 March 28th 07 11:54 AM
USER FORM COPY tkraju via OfficeKB.com Excel Programming 2 August 9th 06 05:32 AM
copy sheets selected on user form Tom Ogilvy Excel Programming 0 August 19th 04 06:15 PM
copy sheets selected on user form Ron de Bruin Excel Programming 0 August 19th 04 06:03 PM


All times are GMT +1. The time now is 04:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"