Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

What is the active control?

Posted on 1999-01-18
4
Medium Priority
?
159 Views
Last Modified: 2011-10-03
I need to know what is the active control? Is there some way to know this?
 Jose Hernandez




0
Comment
Question by:al361345
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:al361345
ID: 1469246
Edited text of question
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 1469247
Look at Screen.ActiveControl.
0
 
LVL 3

Expert Comment

by:traygreen
ID: 1469248
If you need to find the control at runtime...
Select case ActiveControl.Name
  case "text1"
    call text1_gotfocus(ActiveControl.Index)
    ' or whatever you want to happen
end select
0
 

Author Comment

by:al361345
ID: 1469249
Thanks you emoreau and traygreen.
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question