Results 1 to 9 of 9

Macro Not Running Via Shortcut Keys

Threaded View

  1. #1
    Registered User
    Join Date
    02-13-2009
    Location
    california
    MS-Off Ver
    Excel 2003
    Posts
    10

    Talking Macro Not Running Via Shortcut Keys

    The following macro works when I run using Alt+F8+Enter
    The macro also works when it is linked to a button on the worksheet.
    However, it does not work when I try to use the keyboard shortcut Ctrl+Shift+P.
    I've tried adding the shortcut key code into the macro -- still doesn't work.
    I've tried changing the shortcut key to a different letter -- still doesn't work.
    Please help. Thank you!!

    Sub Expense()
    ' Keyboard Shortcut: Ctrl+Shift+P
    '
        Application.Goto Reference:="G"
        SendKeys "{F2}"
    End Sub
    Sub Expense()
    ' Keyboard Shortcut: Ctrl+Shift+P
    '
        Application.Goto Reference:="G"
        SendKeys "{F2}"
        Application.MacroOptions Macro:="Expense", ShortcutKey:="P"
    End Sub
    Last edited by ashleyhkim; 02-10-2010 at 09:57 PM. Reason: [SOLVED]

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