Solved

What is the active control?

Posted on 1999-01-18
4
151 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
  • 2
4 Comments
 

Author Comment

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

Accepted Solution

by:
Éric Moreau earned 50 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 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