Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding items to a spreadsheet from a user form listbox


Hi:

Can someone please tell me how to do the following?:

I have a spreadsheet that contains a command button that shows a
UserForm. The UserForm contains a ListBox. How do I add items from the
ListBox to the spreadsheet? I want to be able to select an item from
the ListBox, hit an "Add Item" command button and have the selected
item be added to the spreadsheet. The ListBox contains a 6 column
database that will be used to insert the selected items into a matching
6 column spreadsheet.

Is this possible?

Thank you for your help!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Adding items to a spreadsheet from a user form listbox

In your AddItem commandbutton_click event just add:

'change to your needs
sheet1.cells(5,5) = userform1.listbox1.value
sheet1.cells(5,6) = userform1.listbox2.value
specifying the sheet will ensure correct worksheet placement. Cells(5,5) is
E5.

HTH

"aet-inc" wrote in message
...

Hi:

Can someone please tell me how to do the following?:

I have a spreadsheet that contains a command button that shows a
UserForm. The UserForm contains a ListBox. How do I add items from the
ListBox to the spreadsheet? I want to be able to select an item from
the ListBox, hit an "Add Item" command button and have the selected
item be added to the spreadsheet. The ListBox contains a 6 column
database that will be used to insert the selected items into a matching
6 column spreadsheet.

Is this possible?

Thank you for your help!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


Reply
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 items to a combo box on a user form Gazz_85[_2_] Excel Discussion (Misc queries) 1 July 9th 09 05:00 PM
Adding items to columns in a listbox Daniel Bonallack Excel Discussion (Misc queries) 1 May 7th 07 04:45 PM
User form with a listbox John Green[_2_] Excel Programming 4 December 30th 03 07:18 PM
Transfer multiple columns items form listbox to range Rolo[_3_] Excel Programming 3 November 15th 03 06:50 PM
adding a listbox to a spreadsheet [email protected] Excel Programming 2 October 29th 03 05:45 PM


All times are GMT +1. The time now is 09:39 AM.

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

About Us

"It's about Microsoft Excel"