ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Make more than 1 selection from combobox send to another sheet (https://www.excelbanter.com/excel-programming/308229-make-more-than-1-selection-combobox-send-another-sheet.html)

Excel-erate2004[_18_]

Make more than 1 selection from combobox send to another sheet
 
Hi all,

I'm not sure how to do this, but I believe it can be done.

How could I make more than 1 selection from a combo box then have thos
selections appear on another sheet in the order that they were selected
Would I need some kind of buffer or memory container?

For example:

I have 29 products, the user will choose from a combobox of a possibl
29 items, then those selections (meaning more than just 1 selection
will be sent to another sheet which will influence something else.

I hope I described my problem well enough.

Thanks

P.S. I am developing in Excel 2000 using VB

--
Message posted from http://www.ExcelForum.com


tommy

Make more than 1 selection from combobox send to another sheet
 
Excel-erate2004 < wrote:

Hi all,

I'm not sure how to do this, but I believe it can be done.

How could I make more than 1 selection from a combo box then have those
selections appear on another sheet in the order that they were selected.
Would I need some kind of buffer or memory container?

For example:

I have 29 products, the user will choose from a combobox of a possible
29 items, then those selections (meaning more than just 1 selection)
will be sent to another sheet which will influence something else.

I hope I described my problem well enough.

Thanks

P.S. I am developing in Excel 2000 using VBA


---
Message posted from http://www.ExcelForum.com/



i would create an event for the list box using the onClick event or
something similar depending on what your programming in, and in the on
click event add the name of the selected object to an array, that will
add them in the order they are selected so that you can use your array
to add it to the other sheet.. does this help?

Excel-erate2004[_19_]

Make more than 1 selection from combobox send to another sheet
 
I think I know what you mean but How do I set up this array?

I have a combobox on Sheet 1 called cbomain and I'm going to send thes
selections to a series of ComboBoxes on Sheet2, these all follow th
naming system of ComboBox1, Combobox2, ComboBox3...ComboBox29.

So the first selection from cbomain (Sheet1) will go to ComboBox1 o
Sheet2 and the 2nd selection from cbomain on Sheet 1 will go t
Combobox2 on sheet2 etc.

This seems simple enough...but I may require some help. I'll look u
arrays as its been a while and my programming knowledge is not tha
deep.

Thanks for the hel

--
Message posted from http://www.ExcelForum.com


Excel-erate2004[_20_]

Make more than 1 selection from combobox send to another sheet
 
After researching the problem I've discovered the following code:


Dim Temp$, i%


Temp = ""
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then Temp = Temp & ListBox1.List(i)
", "
Next i

'remove the last ;
If Temp < "" Then Temp = Left(Temp, Len(Temp) - 2)

'Put it into the Combobox
Sheets("Step 2").ComboBox1.Value = Temp

Now the only thing I need to do is set it up so that I can send th
selection1 from the listbox to ComboBox1, selection2 to ComboBox2
selection3 to ComboBox3.

How could I set up this last part

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 10:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com