Consulting

Results 1 to 7 of 7

Thread: How to identify method for an assigned shortcut?

  1. #1

    Question How to identify method for an assigned shortcut?

    Hi,

    Is there a way to findout the method name via it's shortcut key?

    Details:
    e.g. A shortcut key Ctrl+Alt+F9 is assigned to an unknown function.

    I want to change the functionality but I really don't know the target code? Is there a way in Excel VBA to find out the target method name using it's shortcut keys?

    Thanks in advance.

    CB

  2. #2
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    If you mean built-in shortcuts, then you can't change their code functionality, you can only point the shortcut key combination at another routine of your own.
    Be as you wish to seem

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Try using the macro recorder. For Ctrl+Alt+F9 I get
    [VBA]Sub Macro1()
    '
    ' Macro1 Macro
    '

    '
    Application.CalculateFull
    End Sub
    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4
    Quote Originally Posted by Aflatoon
    If you mean built-in shortcuts, then you can't change their code functionality, you can only point the shortcut key combination at another routine of your own.
    Nope, I mean shortcuts pointing to custom method.

  5. #5
    Quote Originally Posted by mdmackillop
    Try using the macro recorder. For Ctrl+Alt+F9 I get
    [vba]Sub Macro1()
    '
    ' Macro1 Macro
    '

    '
    Application.CalculateFull
    End Sub
    [/vba]
    This was just an example.

    e.g. What if someone has assigned a shortcut to ABC method using Application.OnKey and I am not aware of it.

    Now, how to findout that ABC method using that shortcut via VBA?

  6. #6
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Did you try it? What was the result?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  7. #7
    Quote Originally Posted by mdmackillop
    Did you try it? What was the result?
    Hi,

    This doesn't help in my case as I have already mentioned that I have to do this via VBA and not by recording a macro.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •