?
Solved

Fast keys into VBA

Posted on 2014-02-05
6
Medium Priority
?
303 Views
Last Modified: 2014-02-06
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
Comment
Question by:BostonBob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Accepted Solution

by:
TheNautican earned 2000 total points
ID: 39837978
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
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39837986
Sendkeys "^+(P)"
0
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39837987
Oops, should have refreshed before posting.
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 31

Expert Comment

by:gowflow
ID: 39838248
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
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 39838778
Can I ask why you need to use Sendkeys? Are you trying to automate some other application?
0
 

Author Closing Comment

by:BostonBob
ID: 39840167
The fastest gets the most points I think...

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

Thanks again!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question