Solved

Finding the focus

Posted on 2006-10-25
2
261 Views
Last Modified: 2010-04-23
Hello,

I am trying to write some code that will evaluate where the focus is currently with a true/false.  something like this.....

If textbox1.focus = true then
end if

The above will not work for me though, any ideas?

Thanks!

-Navicerts
0
Comment
Question by:Navicerts
[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 Comments
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
ID: 17806742
Try using the form's ActiveControl property:

If textbox1 Is Me.ActiveControl Then
End If
0
 
LVL 7

Author Comment

by:Navicerts
ID: 17806856
That worked great, thank you!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with adding DLL file in Windows project 20 47
RLDC Reporting in Visual studio 11 44
Import MySQL data into MS Access using VB.Net interface 5 52
Visual studio 2015 1 35
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…

726 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