Excel VBA Sending combination keys

Hi,

How do I send the following combination keystrokes:

CTRL+SHIFT+H

followed by

24 TABS

followed by

{ENTER} key

Thanks for the help!
COPUSERAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PaulHewsCommented:
Like this:

SendKeys "^+H"  
For i = 1 To 24
    SendKeys "{TAB}"
Next
SendKeys "{ENTER}"
0
COPUSERAuthor Commented:
PaulHews:

I still have problem with SENDKEYS "^+H" line.  

When I physically push the keystrokes, I get the dialog screen as expected.  But sending the keystrokes just won't work.  The dialog screen is from an XLA program.  

0
PaulHewsCommented:
SendKeys is often problematic.  Do you have to enter the key combination at a particular window?  If so, what precaution do you take to ensure the window is active.
0
COPUSERAuthor Commented:
PaulHews:

The XLA file in question is password protected.  I need to invoke a procedure in the XLA file.  If I knew the password, I would simply call the procedure with the required variables.  Since only way I can invoke it by going through the menu (I did try ALT-U, DOWN, RIGHT, ENTER combination already but did not work) item or by calling the keyboard shortcut (CTRL-SHIFT-H).
0
PaulHewsCommented:
You may need to activate the window before sending key strokes.  If you send keys to the main Excel window, you can use

Application.ActiveWorkbook.Activate

before using sendkeys
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.