Macros in combo box

S

steve smallman

Paulo,

Worksheet objects can only have one macro assigned. What
you need to do is to test the value of the combo box, and
execute your code from the combobox result, eg, you assign
this to your combo box,

private sub combobox_change()
select case combobox
Case first_entry
macro_to_run_on_first_entry
Case second_entry
run_this_on_second_entry
etc etc
End Select
end sub

Steve
-----Original Message-----
Hi, I´m creating a combo box in a worksheet with more
than 20 items. How do I assign different macros for
different items and make the combo box recognize all
macros? As of now, I can only assign one macro to all
items, since the combo box doesn´t recognize more than
one macro at a time!!
For instance: I want an item to have a macro to take me
to the worksheet of this item. Then I want another item to
have a different macro which can take me to a different
worksheet. Does anybody know how i can do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top