Ctrl Ctrl Return

Kenn

Board Regular
Joined
Sep 23, 2009
Messages
195
Hello,
I need some code to simulate a simple sequence of key strokes. The sequence is as follows, each key must be pressed separately not simultaneously:-

Control Control Return

Any help is much appreciated,
Thank you
Kenn
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Just for the record, SendKeys is a tool of last resort. If you have not other option but to simulate actual user keystrokes, then so be it. But please understand it's the programming equivalent of using duct tape and bailing twine.
 
Upvote 0
What Greg's saying is: you've come to us with a solution and you're asking us how to implement it, whereas it's often best to come to us with the problem and ask us how to solve it.

Often, not always! :)
 
Upvote 0
What Greg's saying is: you've come to us with a solution and you're asking us how to implement it, whereas it's often best to come to us with the problem and ask us how to solve it.

Often, not always! :)

I'd rephrase that a bit. You did well to show us that you'd mapped a solution. At least it shows us you're trying to solve your problem and not just showing up having done no work on your own and simply expecting others to solve your problems for free. But yes, if you let us know the nature of the problem, sometimes we can offer other solutions that are more robust. Truly, SendKeys is about as robust as a paper mache dump truck. I wouldn't bet any mission critical processes on it without ironclad error checking.
 
Upvote 0
Truly, SendKeys is about as robust as a paper mache dump truck.

Hmm, I did not think it was even that robust.:eeek:

I wouldn't bet any mission critical processes on it without ironclad error checking.

And even that may not be enough. I do not have XL2010, so I can't test this out, but here is a report of some problems associated with SendKeys and XL2010...

http://blog.johnmuellerbooks.com/2011/03/29/sendkeys-in-vba.aspx

And on top of that, here is one bug report that I am aware of (there may be others, I don't know)...

http://support.microsoft.com/kb/179987
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,818
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top