+ Reply to Thread
Results 1 to 5 of 5

Run macro based on combo box seelction (workbook included)

  1. #1
    Forum Contributor
    Join Date
    04-14-2008
    Location
    Fort Collins, Co
    MS-Off Ver
    2016
    Posts
    107

    Run macro based on combo box seelction (workbook included)

    I have searched high and low! I cannot get a combo box to run a macro. I have tried select.case and If statements. Please help!

    All I want is when I select a value from the combo box and press button 1, Macro1 will run.

    See attached workbook and "fix" and post back to the thread if you can. I have XLSM for 2007 & 2010 and XLS for 2003 users.

    I would appreciate this very much!!
    Attached Files Attached Files
    Last edited by 4am; 12-08-2010 at 05:01 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Run macro based on combo box seelction (workbook included)

    If you assign a cell link to your box (e.g. K1) then you can use this single line:
    Please Login or Register  to view this content.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Run macro based on combo box seelction (workbook included)

    Hello 4am,

    Here is code for the button.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Contributor
    Join Date
    04-14-2008
    Location
    Fort Collins, Co
    MS-Off Ver
    2016
    Posts
    107

    Re: Run macro based on combo box seelction (workbook included)

    Leith Ross, you are an Excel star!! Thank you so very much!

  5. #5
    Registered User
    Join Date
    10-26-2011
    Location
    Gulfport, MS
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Run macro based on combo box seelction (workbook included)

    What code would you use if the name of the macro differed from the value in the combo box?

+ 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