LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 192
Default Custom Form: Copy from one list box to another

I am creating a custom form and have two listboxes: source and target. I
want the users to be able to select a product in the source listbox and click
the "Add" button that takes that selection and adds it to the target listbox.
I tried the following to no avail:

Private Sub AddButton_Click()
'Adds whatever is selected in the Source listbox to the Target listbox
With LB_Target
.AddItem LB_Source.Selected '<-Compile Error: Argument not optional
End With

End Sub

Any suggestions/insights?

Thanks.
--
-SA
 
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
Adding custom list and text boxes to the custom tool bar from Excel C API Mousam Excel Discussion (Misc queries) 0 August 7th 07 09:19 AM
Adding custom list and text boxes to the custom tool bar from Excel C API Mousam Excel Programming 0 August 6th 07 10:05 AM
Copy form field value to another form (calendar) [email protected] Excel Programming 1 December 1st 05 09:58 PM
2nd Form deselects list box items on main form RandyDtg1 Excel Programming 3 September 5th 04 09:32 PM
Can you sort a list based on catagory names without useing a custom list? BobbyFlanigan Excel Programming 2 July 29th 04 02:49 AM


All times are GMT +1. The time now is 11:15 AM.

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"