Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the syntax to send a Ctrl&Tab using Sendkeys?

Status
Not open for further replies.

ohmygod

Technical User
Oct 30, 2002
6
JP
I want to send a Ctrl and Tab (Press Tab while holding down control) to another application. I have tried various ways but the application appears to only TAB. I need to Ctrland Tab to get to another part of the Window. Any ideas ?
 
The syntax, to send a <Ctrl><Tab>, using the SendKeys statement would be. . .

SendKeys &quot;^&quot; & vbTab
 
Put your cursor on the function name SendKeys in your code window and press F1. There you will see all the correct sytax needed for doing what you are asking for among other things. At the bottom of the help page shows how to call SendKeys to similate key press for key combinations like Ctrl Alt Shift.

Reviewing this help page is the best thing you can do for yourself in this respect.
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
I tried SendKeys &quot;^&quot; & vbTab and opther similar conatations but it only tabs to the next field in the window.

What I have is a running application window that is split into three sets of fields via 'folder style' tabs towards the top of the Window. Normally you would click on each tab to reveal a new set of fields. However you can also manually type Ctrl & Tab to tab through the tabs. I hope I'm not confusing you. What I want to do is programatically send the Ctrl Tabs to tab to the third set of fields.

If I can't use Sendkeys to control the tabbing in the window, can I reference the tab controls in the window and make the third one active, etc?



 
>'folder style' tabs

What control are you using for this? [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
Basically I want to automate a reporting task that currently takes about 20 minutes to complete manually. The reports are currently created via a third party financial package that I use at work and runs on my P.C.

I am hoping to automate it by running a Visual Basic exe to make various windows active, action mouse movements, clicks and sendkey events. Everything is working ok except for tabbing through the tabs. A typical example of a similar window I'm trying to navigate is the 'Display Settings' in Control Panel. In the Display Settings window you click on the tabs to choose 'Screen Saver, 'Settings', 'Appearance', etc. But as well a clicking to navigate these tabs you can also type CtrlTab to navigate through them.

This is what I want to do using SendKeys but it appears to only issue a normal tab and not a ctrltab.

Thanks for being interested. If I can manage to automate this task I'm hoping to be able to leave the office earlier every day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top