PDA

View Full Version : Solved: Assign data to Combo Box



lacviet2005
05-23-2006, 11:47 AM
Hi all,
I need help again with vba. I try to create a few items assigned to the combo box. Whatever the user select the value returns to another cell. I did try the validation, but didn't get the result i wanted. Please help.: pray2:

Thank you all very much!

Please see the attachment.

lucas
05-23-2006, 12:46 PM
You have to go into design mode and look at the properties for the combobox to see how this works....look at column count, bound column, linked cell and linked fill range.

lacviet2005
05-23-2006, 01:36 PM
Lucas, you're truly a master of excel :bow: . Thank you so much.

Cheers.

P.S. My first week of entering the vba code madness....:bug:

lucas
05-23-2006, 06:45 PM
Master...........not really....on a long learning curve myself
Your welcome, and we didn't even touch on vba.............

joelle
05-30-2006, 03:01 PM
Hello Lucas,

I happened to see your post and it's very interesting .. except that I dont know how to duplicate the link function :(
So far, I can use validation to create a simple dropdown box but how do I link the value (5, 10, 15 ..) to cell B10? Also, how do I show the property of the combobox.

Pls land a hand again,
Thanks a lot!

Nee

lucas
05-30-2006, 03:32 PM
Hi Nee,
Download the file from post 2 of this thread
Open the excel file
right click on any toolbar(you should get a list of available toolbars)
Look for the one that says "Visual Basic" and make sure its checked
the visual basic toolbar will open somewhere on the screen
look towards the right end of the visual basic toolbar for a button that says "Design Mode" when you hover over it.
click the design mode button and you should then be able to right click on the combo box and look for "properties"
then read post 2 again and look at the items mentioned there in the properties of the combobox....see the connection?

lucas
05-30-2006, 03:37 PM
PS Nee,
the combobox used on the example was created with the control toolbox not the forms toolbar. If you look on the visual basic toolbar for the control toolbox you can add these activeX comboboxes to your spreadsheet.

lucas
05-30-2006, 03:39 PM
Also don't forget to exit design mode when your finished

joelle
05-30-2006, 04:00 PM
Hello Lucas:

Fantastic help! especially on a "solved" post.
And thanks for pointing out that the box was created from "the control toolbox not the forms toolbar" !

I sailed along pretty smooth until ... well I failed at getting the correct value on to linked cell B10
from the original post, fillrange is J1:K5 and linkcell is B10
I set my fillrange at M1:N5 and linked cell B11, but I cant get the correct
value to cell B11????

Thanks in advance for your kindness and patience with a beginner ..

Nee

joelle
05-30-2006, 04:21 PM
Lucas,

Never mind my slowness. I found what I missed and now I can get the correct data to linked cell B11.
Again, thanks so much for the step-by-step instruction on how to deal with the control toolbox droplists. Very helpful and now I am more than one step ahead of the upcoming project!!!!

Very grateful to you :bow:

Best regards,
Nee

lucas
05-30-2006, 05:15 PM
Your welcome Nee, glad to help....maybe you can return the favor one day when someone is trying to figure this out...

joelle
05-31-2006, 01:55 PM
Absolutetly - and how much I long for the day when I can provide instead of asking for tips ..
Thanks again and take care!

Nee

lucas
05-31-2006, 03:30 PM
It will happen before you know it. There are some high caliber contributors at this site but sometimes its something I have tried or seen in the forum and I get to try to help someone. Responses like yours are very gratifying.