Shortcuts for VBA procedures in Modules of MS Access

Discussion in 'Microsoft Access VBA Modules' started by Thomas Wiedmann, Apr 7, 2012.

  1. Hello,

    is there a way to assign shortcuts for VBA procedures in Modules of MS
    Access; if yes, how?

    Thomas Wiedmann
     
    Thomas Wiedmann, Apr 7, 2012
    #1
    1. Advertisements

  2. Do you mean "keyboard shortcuts", such as "Fn" plus a Function Key like
    "F6"?

    Keyboard actions trigger events which fire an event, events can execute
    Macros or VBA functions in the Form's (Object) Module-- if you want to
    execute VBA procedures that are located in a General Module from either of
    these type event, you can do so via a macro or VBA code. Events associated
    with keyboard actions include: On Key Down, On Key Up, and On Key Press.

    --
    Larry Linson
    Microsoft Office Access MVP
    Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

    "Thomas Wiedmann" <> wrote in message
    news:jlpmsh$oj8$...
    > Hello,
    >
    > is there a way to assign shortcuts for VBA procedures in Modules of MS
    > Access; if yes, how?
    >
    > Thomas Wiedmann
    >
    >
     
    Access Developer, Apr 7, 2012
    #2
    1. Advertisements

  3. > Do you mean "keyboard shortcuts", such as "Fn" plus a Function Key like
    > "F6"?


    Yes (whereas [Fn] usually is a key on notebooks only AFAIK)

    > Keyboard actions trigger events which fire an event, events can execute
    > Macros or VBA functions in the Form's (Object) Module-- if you want to
    > execute VBA procedures that are located in a General Module from either of
    > these type event, you can do so via a macro or VBA code.


    Can you give an example how to assign a keyboard shortcut to an Access
    macro, e. g. [Ctrl] + T for a procudure 'Sub Test'?

    Thomas Wiedmann
     
    Thomas Wiedmann, Apr 8, 2012
    #3
  4. To my mind, reassigning keycode actions tends to be a bit "quirky", so I
    avoid it. What are you trying to accomplish with the code you'd execute, and
    what are the circumstances in which you'd want to do it -- perhaps someone
    can offer a useful alternative, or perhaps someone else uses reassigned
    keycode actions and can give you an example.

    --
    Larry Linson
    Microsoft Office Access MVP
    Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

    "Thomas Wiedmann" <> wrote in message
    news:jls3hi$ufi$...
    >> Do you mean "keyboard shortcuts", such as "Fn" plus a Function Key like
    >> "F6"?

    >
    > Yes (whereas [Fn] usually is a key on notebooks only AFAIK)
    >
    >> Keyboard actions trigger events which fire an event, events can execute
    >> Macros or VBA functions in the Form's (Object) Module-- if you want to
    >> execute VBA procedures that are located in a General Module from either
    >> of these type event, you can do so via a macro or VBA code.

    >
    > Can you give an example how to assign a keyboard shortcut to an Access
    > macro, e. g. [Ctrl] + T for a procudure 'Sub Test'?
    >
    > Thomas Wiedmann
    >
     
    Access Developer, Apr 8, 2012
    #4
  5. Oh, yes... I apologize that, given how little I use macros, I simply
    overlooked that I should have mentioned the AutoKeys macro. For details, see
    http://www.dataschenk.com/newsletters/Tips/Access-Autokeys.htm. It may be
    just what you need.

    --
    Larry Linson
    Microsoft Office Access MVP
    Co-Author, Microsoft Access Small Business Solutions, Wiley 2010

    "Thomas Wiedmann" <> wrote in message
    news:jls3hi$ufi$...
    >> Do you mean "keyboard shortcuts", such as "Fn" plus a Function Key like
    >> "F6"?

    >
    > Yes (whereas [Fn] usually is a key on notebooks only AFAIK)
    >
    >> Keyboard actions trigger events which fire an event, events can execute
    >> Macros or VBA functions in the Form's (Object) Module-- if you want to
    >> execute VBA procedures that are located in a General Module from either
    >> of these type event, you can do so via a macro or VBA code.

    >
    > Can you give an example how to assign a keyboard shortcut to an Access
    > macro, e. g. [Ctrl] + T for a procudure 'Sub Test'?
    >
    > Thomas Wiedmann
    >
     
    Access Developer, Apr 8, 2012
    #5
  6. Thomas Wiedmann, Apr 14, 2012
    #6
    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. Mike Thomas

    VBA Modules Disappearing

    Mike Thomas, Sep 12, 2003, in forum: Microsoft Access VBA Modules
    Replies:
    0
    Views:
    340
    Mike Thomas
    Sep 12, 2003
  2. Guest

    Setting Object References in Access Modules by using VBA Code

    Guest, Jan 22, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    4
    Views:
    384
    Tim Ferguson
    Jan 24, 2004
  3. Derek Boutang

    Modules(index) and Modules("name") return different modules?

    Derek Boutang, Sep 2, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    4
    Views:
    423
    Brendan Reynolds
    Sep 3, 2004
  4. Guest

    calling standard module procedures from event procedures

    Guest, Feb 9, 2006, in forum: Microsoft Access VBA Modules
    Replies:
    2
    Views:
    567
    Guest
    Feb 9, 2006
  5. Guest

    Class Modules in Access VBA

    Guest, Jul 23, 2006, in forum: Microsoft Access VBA Modules
    Replies:
    4
    Views:
    1,723
  6. Larry

    Function Modules vs Sub Modules

    Larry, Sep 11, 2008, in forum: Microsoft Access VBA Modules
    Replies:
    4
    Views:
    357
    Larry
    Sep 11, 2008
  7. Eldon

    List of VBA Modules in Access 2007

    Eldon, Mar 17, 2009, in forum: Microsoft Access VBA Modules
    Replies:
    3
    Views:
    955
    Eldon
    Mar 17, 2009
  8. Stefan Hoffmann

    Re: controling excel from vba access and using sub procedures

    Stefan Hoffmann, Feb 1, 2010, in forum: Microsoft Access VBA Modules
    Replies:
    1
    Views:
    369
    ryguy7272
    Feb 1, 2010
Loading...