Create Auto Keys with VBA?? (1 Viewer)

EternalMyrtle

I'm still alive
Local time
Today, 00:00
Joined
May 10, 2013
Messages
533
Hello,

I am currently using a Macro to assign auto keys. However, since my users are using Runtime, I am finding the program crashes when one attempts to use an auto key when it cannot be used.

I have tried to solve this by using the OnError action to make the macro fail and abort but it is not working.

Is there a way to create auto keys with vba code so that I can insert an error handler in there?

Thank you!
 

TJPoorman

Registered User.
Local time
Today, 01:00
Joined
Jul 23, 2013
Messages
402
In your autokeys macro use "RunCode". The VBA code you use will need to be a public function in a public module
 

EternalMyrtle

I'm still alive
Local time
Today, 00:00
Joined
May 10, 2013
Messages
533
Thanks for your reply. I should have been more specific: how do I write the code to assign auto keys?
 

TJPoorman

Registered User.
Local time
Today, 01:00
Joined
Jul 23, 2013
Messages
402
I believe that has to be done through the macro not code.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 08:00
Joined
Sep 12, 2006
Messages
15,662
I was not able to set autokeys in code, only with macros

I tried to find a way to let users manage some of their own autokey short cuts, but failed.
 

Users who are viewing this thread

Top Bottom