Run Code with Shortcut Keys

  • Thread starter Thread starter Byron
  • Start date Start date
B

Byron

Using Access 2002, the old method for assigning a
keyboard short cut to run a macro that inturn runs code
does not seem to work, or I am just not doing it
correctly.

Does anyone have some insite?

Byron
 
Byron said:
Using Access 2002, the old method for assigning a
keyboard short cut to run a macro that inturn runs code
does not seem to work, or I am just not doing it
correctly.

Does anyone have some insite?

Byron

It should work. What exactly have you tried?
 
Dirk,

I have tried naming the macro with several names that I
thought would work. One was ^q. This should not be a
conflict. The other was ^{F12}. This also should not be a
conflict. I have been unsuccessfull in getting the key
sequence to activate the macro which would inturn run a
public function.

Thanks for your help,

Byron
 
Dirk,

Thanks for the attempt to help, but I got it. Another of
those brain lockups. I finally figured out that I did
not name the macro group "AutoKeys". I also had an issue
that did not show up until I compiled all modules.

Thanks again.

Byron
 
Byron said:
Dirk,

I have tried naming the macro with several names that I
thought would work. One was ^q. This should not be a
conflict. The other was ^{F12}. This also should not be a
conflict. I have been unsuccessfull in getting the key
sequence to activate the macro which would inturn run a
public function.

You're using the AutoKeys macro for this, I trust? I created the
following function in a standard module:

Function MacroTestFunction()

MsgBox "Macro Test Succeeded!"

End Function

Then I created a macro named "AutoKeys", and I added this line:

Macro Name: ^q
Action: RunCode
Function: MacroTestFunction()

and I saved it.

Pressing Ctrl+q now results in the message box "Macro Test Succeeded!"
being displayed.
 
Back
Top