Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Fast keys into VBA

Posted on 2014-02-05
6
Medium Priority
?
306 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

604 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