View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Steve Mackay[_2_] Steve Mackay[_2_] is offline
external usenet poster
 
Posts: 5
Default force keyboard (ALT) shortcuts in VBA Code?

Thanks for the tip. I understand it in concept but can't seem to get it to
work in practice. So, to go back to my paste example, my code would look
like this?

Sub test()
Application.SendKeys ("%ep")
End Sub

But that doesn't seem to work correctly. Can you give me an example.
Sorry, I know this is probably very basic programming, but I appreciate your
help.

Steve

"Jim Cone" wrote in message
...
Steve,

The direct answer to your questions is to tell you to look at "SendKeys"
in help.
A easier method would be to set a reference to the Add-in in Tools |
References in the VBE.
That will allow you to call the macro using the run method...

Application.Run("MacroName")

Regards,
Jim Cone
San Francisco, CA

"Steve Mackay" wrote in message
...
Is it possible to force your vba code to use keyboard shortcuts - like
"CTRL
+ C" or "ALT + E + C+ENTER" instead of "Selection.Copy".
The reason why I ask is that I have an add-in menu in Excel located
between
the "Data" & "Windows" menus that I would like to access in a macro. The
shortcut would be "ALT +L+A+ENTER
Thanks,
Steve