Solved

Fast keys into VBA

Posted on 2014-02-05
6
299 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 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

837 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