View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cliff Myers Cliff Myers is offline
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