Dropdown Box Name

greg_03
01-20-2005, 09:50 AM
I have put in my worksheet a drop down box using the forms toolbar in excel. I have populated the drop down with a list in excel. I now want to add a change macro so that when I change the value of the drop down box it will make changes within the sheet. What I can't figure out is the name of the dropdown box, the default marco name is dropdown32_change() but if I use x = dropdown32.text or x = dropdown32.value excel gives a object required error. How do you referance the value of the dropdown box?

Thanks in advance.

ryan230880
01-20-2005, 10:26 AM
I have put in my worksheet a drop down box using the forms toolbar in excel. I have populated the drop down with a list in excel. I now want to add a change macro so that when I change the value of the drop down box it will make changes within the sheet. What I can't figure out is the name of the dropdown box, the default marco name is dropdown32_change() but if I use x = dropdown32.text or x = dropdown32.value excel gives a object required error. How do you referance the value of the dropdown box?

Thanks in advance.

Hi, Im just a beginner here but I have used a drop down box before and here is the code I use to reference it:

If MyComboBox = "element" Then
'execute code here if the combobox equals "element"


Mycombobox is the name of my combo box and element is one of the values contained in it.

Hope this helps

greg_03
01-20-2005, 10:31 AM
But where did you find that the name of your combo box was "MyComboBox", I can not find any where that lists names of these objects

italkid
01-20-2005, 10:41 AM
Use controls from the Control toolbox instead.
One of the properties of those controls is "Name"... ;)

greg_03
01-20-2005, 10:46 AM
Thank you - control toolbox not forms, thats what I was looking for.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum