Solved

Fast keys into VBA

Posted on 2014-02-05
6
293 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
6 Comments
 
LVL 8

Accepted Solution

by:
TheNautican earned 500 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 26

Expert Comment

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

Expert Comment

by:MacroShadow
ID: 39837987
Oops, should have refreshed before posting.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 29

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now