Can you enable/disable macro keyboard shortcuts in excel 2003?

Discussion in 'Microsoft Excel Misc' started by Guest, Sep 18, 2007.

  1. Guest

    Guest Guest

    Can you enable/disable macro keyboard shortcuts in excel 2003?
     
    Guest, Sep 18, 2007
    #1
    1. Advertisements

  2. Guest

    Jim Rech Guest

    If a shortcut is assigned to a macro via Tools, Macro, Macros, Options there
    is no global way of disabling it. You would have to remove the shortcut
    assignment or assign a null macro to it using OnKey:

    Application.OnKey "^m", ""

    When you removed the OnKey:

    Application.OnKey "^m"

    the former shortcut would work again.

    --
    Jim
    "Burninator2000" <> wrote in message
    news:...
    | Can you enable/disable macro keyboard shortcuts in excel 2003?
     
    Jim Rech, Sep 18, 2007
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Its not that I really want to disable the macro, but that I created it in
    Excel 97. Now when I try to use the shortcut in 2003 nothing happens. It can
    still be run via Tools, Macro etc.. And the keyboard shortcut is still setup
    in options. Any ideas? I was wondering if there was a history of problems
    like this between different versions of excel.

    "Jim Rech" wrote:

    > If a shortcut is assigned to a macro via Tools, Macro, Macros, Options there
    > is no global way of disabling it. You would have to remove the shortcut
    > assignment or assign a null macro to it using OnKey:
    >
    > Application.OnKey "^m", ""
    >
    > When you removed the OnKey:
    >
    > Application.OnKey "^m"
    >
    > the former shortcut would work again.
    >
    > --
    > Jim
    > "Burninator2000" <> wrote in message
    > news:...
    > | Can you enable/disable macro keyboard shortcuts in excel 2003?
    >
    >
    >
     
    Guest, Sep 18, 2007
    #3
  4. Guest

    Jim Rech Guest

    I think that a macro shortcut would override Excel's use of the keystroke,
    say if Excel 2003 used a shortcut that Excel 97 did not (not that I know of
    one off the top of my head). So I'd expect your shortcut to work, unless
    you had a macro that used OnKey to grab the shortcut. That seems to
    override an assignment made via Macro, Options. You could rule that
    possibly out by starting Excel 2003 in safe mode and then opening your
    workbook and checking if the shortcut worked. To open Excel in safe mode,
    from Start->Run enter "Excel.exe /s" (no quotes, there is a space before the
    slash). Worth a try even if you're positive there is no OnKey running.

    Btw, what is the shortcut key that's not working?

    --
    Jim
    "Burninator2000" <> wrote in message
    news:...
    | Its not that I really want to disable the macro, but that I created it in
    | Excel 97. Now when I try to use the shortcut in 2003 nothing happens. It
    can
    | still be run via Tools, Macro etc.. And the keyboard shortcut is still
    setup
    | in options. Any ideas? I was wondering if there was a history of problems
    | like this between different versions of excel.
    |
    | "Jim Rech" wrote:
    |
    | > If a shortcut is assigned to a macro via Tools, Macro, Macros, Options
    there
    | > is no global way of disabling it. You would have to remove the shortcut
    | > assignment or assign a null macro to it using OnKey:
    | >
    | > Application.OnKey "^m", ""
    | >
    | > When you removed the OnKey:
    | >
    | > Application.OnKey "^m"
    | >
    | > the former shortcut would work again.
    | >
    | > --
    | > Jim
    | > "Burninator2000" <> wrote in
    message
    | > news:...
    | > | Can you enable/disable macro keyboard shortcuts in excel 2003?
    | >
    | >
    | >
     
    Jim Rech, Sep 18, 2007
    #4
  5. Guest

    Guest Guest

    I have found what the problem was. The module name in visual basic was the
    same as the macro name. As soon as I changed the module name the shortcut
    worked fine. Strangely, this arrangement worked fine in Excel 97 but 2003
    wouldn't have it. Also the macro itself would work fine in 2003 just not via
    the shortcut. The shortcut I used all along was Ctrl+Shift+R, and this is now
    working fine.

    Thanks for the advice.

    "Jim Rech" wrote:

    > I think that a macro shortcut would override Excel's use of the keystroke,
    > say if Excel 2003 used a shortcut that Excel 97 did not (not that I know of
    > one off the top of my head). So I'd expect your shortcut to work, unless
    > you had a macro that used OnKey to grab the shortcut. That seems to
    > override an assignment made via Macro, Options. You could rule that
    > possibly out by starting Excel 2003 in safe mode and then opening your
    > workbook and checking if the shortcut worked. To open Excel in safe mode,
    > from Start->Run enter "Excel.exe /s" (no quotes, there is a space before the
    > slash). Worth a try even if you're positive there is no OnKey running.
    >
    > Btw, what is the shortcut key that's not working?
    >
    > --
    > Jim
    > "Burninator2000" <> wrote in message
    > news:...
    > | Its not that I really want to disable the macro, but that I created it in
    > | Excel 97. Now when I try to use the shortcut in 2003 nothing happens. It
    > can
    > | still be run via Tools, Macro etc.. And the keyboard shortcut is still
    > setup
    > | in options. Any ideas? I was wondering if there was a history of problems
    > | like this between different versions of excel.
    > |
    > | "Jim Rech" wrote:
    > |
    > | > If a shortcut is assigned to a macro via Tools, Macro, Macros, Options
    > there
    > | > is no global way of disabling it. You would have to remove the shortcut
    > | > assignment or assign a null macro to it using OnKey:
    > | >
    > | > Application.OnKey "^m", ""
    > | >
    > | > When you removed the OnKey:
    > | >
    > | > Application.OnKey "^m"
    > | >
    > | > the former shortcut would work again.
    > | >
    > | > --
    > | > Jim
    > | > "Burninator2000" <> wrote in
    > message
    > | > news:...
    > | > | Can you enable/disable macro keyboard shortcuts in excel 2003?
    > | >
    > | >
    > | >
    >
    >
    >
     
    Guest, Sep 18, 2007
    #5
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Berk

    Excel Macro Enable/Disable

    Berk, Oct 30, 2003, in forum: Microsoft Excel Misc
    Replies:
    1
    Views:
    282
    Chip Pearson
    Oct 30, 2003
  2. Pegasus

    Disable keyboard shortcuts

    Pegasus, Jun 26, 2007, in forum: Microsoft Excel Misc
    Replies:
    21
    Views:
    779
    Stan Brown
    Jul 1, 2007
  3. Guest
    Replies:
    9
    Views:
    1,357
    Jim Rech
    Jul 12, 2007
  4. Tina Shaw
    Replies:
    1
    Views:
    405
    Gord Dibben
    Jul 17, 2008
  5. tyhubb
    Replies:
    1
    Views:
    594
    Gary''s Student
    Aug 15, 2008
Loading...

Share This Page