+ Reply to Thread
Results 1 to 2 of 2

how to assign a different macro to each*combobox selection in form control....

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    Delhi
    MS-Off Ver
    Excel 2007
    Posts
    2

    how to assign a different macro to each*combobox selection in form control....

    Hi Everyone,

    I am very new to macros...Trying to assign a macro to a form control combo box. I've looked up information online, but I still cannot seem to get this to work.

    I inserted the combo box via Developer > Insert > Form Controls. Then I went to Format Control and selected the items via Input Range.


    I've tried selecting the*combobox*and assigning the macro but this only assigns one macro to the whole*combobox. So only the macro assigned runs no matter which item is selected in the*combobox.

    I have 7 different items to select from from the combo box. When each is selected, I want a different macro to run.
    and also i have recorded all 7 macros.

    But i dont knw how do I assign a different macro to each*combobox selection?

    Please help me all...

  2. #2
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    308

    Re: how to assign a different macro to each*combobox selection in form control....

    Hi

    You need some If Statements or Case statements in your macro. Essentially, your ComboBox macro will read the ComboBox then decide which of your 7 macros to call.

    It looks something like:
    Please Login or Register  to view this content.
    Hope this helps.

    Cheers, Rob.
    Last edited by rscsmith; 08-03-2012 at 03:06 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1