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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

index of current/active control?

Status
Not open for further replies.

andzejek

MIS
Sep 1, 2007
154
US
How to find index of current/active control???

Andrew
 
What is your meaning of a control's index ?
This ?
Me.ActiveControl.TabIndex ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Control's index - it's index(number) in a collection - not a Tabindex.
 
Me.ActiveControl.Name

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
The Controls collection is indexed by Name, so why do you want a number ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
because I don't know which control is now active(has focus), but I want to move focus to the next control.
 
Why not simply send a Tab with the SendKeys function ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
well, all my contorls are disabled, only current control is enabled and I want, not only move focus but also, first enable next control, next move focus and disable prev. control.
 
How are ya andzejek . . .

For the active control:
Code:
[blue]   Screen.ActiveControl.Name[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top