+ Reply to Thread
Results 1 to 3 of 3

VB Code to assign Macro Button

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to assign Macro Button

    Hello:

    Please refer to attached file.
    i have the name of the Macro in cell G1.
    I need Macro Button, to run the name of the Macro which is cell G1.
    Example:

    I have 4 Macro's in this workbook, named Test1,Test2,Test3 and Test4.
    If G1 is Test2 then the macro button needs to run Sub Test2
    If G1 is Test4 then the macro button needs to run Sub Test4 and so on.

    Let me know if you have any questions.
    Thanks.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-20-2017
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    199

    Re: VB Code to assign Macro Button

    Easier to assign a different button for each macro.

    Just my 2 cents

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to assign Macro Button

    Hello:

    I got it working

    Please Login or Register  to view this content.
    Thanks

    Riz

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VB Code to assign Macro Button to certain Code
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2016, 05:36 PM
  2. Macro to Create Button and assign code
    By swatsp0p in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-06-2014, 12:21 PM
  3. [SOLVED] Please help! macro code needed to assign to command button to check a column of checkboxes
    By cnbv in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2013, 04:47 AM
  4. Assign a macro to a button via VBA code
    By AverageCanadian in forum Excel General
    Replies: 3
    Last Post: 03-09-2012, 11:09 AM
  5. Macro to create Command Button and assign code
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2011, 09:19 AM
  6. Replies: 6
    Last Post: 12-23-2009, 02:28 PM
  7. How do I assign a code to a button
    By Stevesmith in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-26-2007, 11:48 AM

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