• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

Fast keys into VBA

Hi All,

Any idea in how to create the manual action of hitting the keys "Control + SHIFT + P"   into vba code?

For example, a similar action for manually hitting the "enter" key transformed into vba code (from none other that Mr. Gowflow, one of my favorite Rock Stars on this forum) is:  Sendkeys "Enter"

I've tried a few combinations for "Control + SHIFT + P" but no luck so far....

Your ideas save beginners like me eons of time.   :)

thanks!
0
BostonBob
Asked:
BostonBob
1 Solution
 
TheNauticanCommented:
try something like this
SendKeys("^+p")

Open in new window


more info can be found here

http://msdn.microsoft.com/en-us/library/office/aa202943%28v=office.10%29.aspx

Regards,
-Naut
0
 
MacroShadowCommented:
Sendkeys "^+(P)"
0
 
MacroShadowCommented:
Oops, should have refreshed before posting.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
gowflowCommented:
I should change my nick to ...

(from none other that Mr. Gowflow, one of my favorite Rock Stars on this forum)

RockStars !!! I like it.
tks your appreciation and I guess there are plenty of RockStars on this Forum as you can well attest you have a bunch to choose from.

to make it more handy for you (for sure above is exactly right) here is a full list that you can use with SendKeys

http://www.developerfusion.com/article/57/sendkeys-command/



gowflow
0
 
Rory ArchibaldCommented:
Can I ask why you need to use Sendkeys? Are you trying to automate some other application?
0
 
BostonBobAuthor Commented:
The fastest gets the most points I think...

(Unless that is not the way to do things here).

Thanks again!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now