+ Reply to Thread
Results 1 to 3 of 3

Want to run two macro with one shortcut

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Post Want to run two macro with one shortcut

    hi, there
    i want to run two macro with one shortcut key..
    like

    ctrl+a
    first time run "macro1"
    now again
    ctrl+a
    second time run "macro2"

    thanx
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Want to run two macro with one shortcut

    Hi Haroon,

    Can I ask the reason why they would need to press ctrl+A a second time.

    Also what do you want to happen on the 3rd press - revert back to the start?

    Is there any reason why after the CTRL A is selected we couldn't run Macro 1, once that has finished continue onto Macro 2?

    The shortcut keys are specifically designed for the same task to be completed over and over again

  3. #3
    Forum Contributor
    Join Date
    07-07-2014
    Location
    ericbartha.com
    MS-Off Ver
    2016 Professional
    Posts
    126

    Re: Want to run two macro with one shortcut

    @HaroonSid -

    Have 3 subs. The first sub can "call" macro 1, then macro 2. Like this:

    Please Login or Register  to view this content.
    Then, assign 'test' to the hotkey.

    Since you are calling them in order, macro2 wont run until macro1 is done.

+ 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. How to put Alt 1 shortcut into Macro
    By qzqzjcjp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-30-2016, 02:54 PM
  2. Any shortcut to run VBA macro when macro file is close
    By Kalpesh93 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2015, 10:03 AM
  3. Replies: 3
    Last Post: 02-21-2014, 10:19 AM
  4. Replies: 4
    Last Post: 07-15-2013, 02:43 AM
  5. Run Macro Via Shortcut
    By ajocius in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-29-2012, 02:38 AM
  6. [SOLVED] Can get macro to run but not with shortcut
    By mmccra2858 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2012, 01:09 PM
  7. Macro shortcutsWhen you are assigning a keyboard shortcut to a macro?
    By JudithJubilee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2005, 04:06 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