+ Reply to Thread
Results 1 to 8 of 8

Call/Run Macro using cell's value

  1. #1
    Registered User
    Join Date
    06-09-2012
    Location
    San Antonio, TX
    MS-Off Ver
    Excel 2007
    Posts
    9

    Call/Run Macro using cell's value

    Need help if this is an option...

    The value of I2 = Color
    I have a macro named Color

    I want to run the macro based on the value in I2 vs. using Call Color

    Thanks,

    Shane

  2. #2
    Forum Contributor
    Join Date
    05-25-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Call/Run Macro using cell's value

    So, basically, if you change the value on Sheet1, Cell I2, to the text, "Color" - you want it to execute a macro named "Color" or just a fix named macro? e.g. is "Color" a variable based name. If you enter "Test" in cell I2, should it then run a macro named "Test"?

    If you don't have a variable name, you can use the following and place under sheet 1;

    Please Login or Register  to view this content.
    If you do have a variable name, you can use the following and place under sheet 1;

    Please Login or Register  to view this content.

    Hope this helps - please let me know if you have any questions.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,215

    Re: Call/Run Macro using cell's value

    This is a duplicate and answered in your other thread.

    Please don't double post ... it doesn't help; it wastes everyone's time.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    06-09-2012
    Location
    San Antonio, TX
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Call/Run Macro using cell's value

    TMShucks, there was latency after first post, i checked under myposts, and didn't see it, so that's why i reposted

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,215

    Re: Call/Run Macro using cell's value

    OK, that I can believe.

  6. #6
    Forum Contributor
    Join Date
    05-25-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Call/Run Macro using cell's value

    good ol' shucks. So the code I posted here is better than your answered thread right?

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,215

    Re: Call/Run Macro using cell's value

    good ol' shucks.
    I'm sorry; that's very personal. 60 isn't that old these days!

    Anyway, your answer is somewhat more complex than mine. I was basically answering the question and demonstrating the principle.

    Regards, TMS

  8. #8
    Forum Contributor
    Join Date
    05-25-2012
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    194

    Re: Call/Run Macro using cell's value

    Haha, my bad, but you're right, 60 isn't that bad . And yes, I have the ability to add a bit more than is necessary (a determent to my code!). Thanks for taking a look at it.

+ 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