Assigning a keyboard shortcut to a macro in Access 2007
May 10, 2013 10:15 AM   Subscribe

Is there a simple way to assign a keyboard shortcut to a macro in Access 2007? I understand that macros behave differently in Access than they do in Excel (which I'm more familiar with). I have written a sub called "ImportAll" in Module1. I'd like it to run when I push Ctrl+I. How would I go about achieving this?
posted by Proginoskes to Computers & Internet (4 answers total) 1 user marked this as a favorite
Best answer: Here
posted by blue t-shirt at 10:20 AM on May 10, 2013

Response by poster: blue t-shirt: Followed those steps, but it gives me an error saying "Microsoft Office Access can't find the object 'ImportAll.'"
posted by Proginoskes at 10:41 AM on May 10, 2013

Best answer: If I remember my Access correctly (it's been a while!) an Access macro and a Visual Basic for Applications subroutine are not the same thing. You might need to create an Access macro to bind your shortcut key to, and have that macro do a RunCode to execute your VBA sub.
posted by flabdablet at 11:35 AM on May 10, 2013

Response by poster: Ah, figured out the problem - was a bit confused about where to put "Autokeys"....I had it in the "Macro Name" field....which was not correct. Thanks to both of you for your help!
posted by Proginoskes at 11:48 AM on May 10, 2013

« Older Replacement for Lockinfo?   |   Ethically Produced Duds Similar to Everlane, U.S.... Newer »
This thread is closed to new comments.