+ Reply to Thread
Results 1 to 2 of 2

Shortcut key executes macro in another workbook

  1. #1
    Registered User
    Join Date
    10-09-2010
    Location
    Dorking, England
    MS-Off Ver
    Excel 2007
    Posts
    1

    Shortcut key executes macro in another workbook

    Have assigned shortcut key CTRL+L to macro ControlL in workbook. Upon execution macro references a specific configuration worksheet within the workbook. This works fine. However, I have similar module and and macro in another workbook. If both workbooks are open the wrong instance of ControlL is sometimes executed. How can I ensure macro ControlL in active workbook is always invoked?
    Last edited by lamotu; 10-10-2010 at 03:08 PM.

  2. #2
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Shortcut key executes macro in another workbook

    Here's how I would do it:

    Put 1 macro ControlL in Personal.xls, and a sub "FileControlL" in each workbook. Have Ctrl+L execute Personal.xls!ControlL() and that macro selects the active workbook to run the individual FileControlL().
    Please Login or Register  to view this content.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

+ 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