Mach1pro
asked on
How to go to a specific TabIndexed control
I know the name of the control in a form and can retrieve the tabIndex. eg. i = Controls("name of control").TabIndex
How can I set the focus to a specific control using the tabindex? For example I want to set focus to i + 3
How can I set the focus to a specific control using the tabindex? For example I want to set focus to i + 3
ASKER
tbsgadi
Your code would set the focus to the next control in the control indexes, not the next tabIndex.
Your code would set the focus to the next control in the control indexes, not the next tabIndex.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You might want to check for TabStop being set to true also and count on only if that is met.
That would involve iterating through the controls at least three times!
But if you're sure it won't be then yep - Dave's way is the way.
That would involve iterating through the controls at least three times!
But if you're sure it won't be then yep - Dave's way is the way.
How about Controls(i+3).setfocus
Good Luck!
Gary