Solved

Puting the cursor to the right

Posted on 2009-04-02
3
253 Views
Last Modified: 2012-05-06
How to Put the cursor to the right side of the text box upon executing the setfocus?
example i have a text box name text1.text then a command button name cmd1.
my code goes like this;

Private Sub cmd1_Click()
Text1.SetFocus
End Sub

i want the cursor to position right side of the text1.text



sample.bmp
0
Comment
Question by:Whing Dela Cruz
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Antagony1960 earned 500 total points
Comment Utility
Private Sub cmd1_Click()
Text1.SelStart = Len(Text1.Text)
Text1.SetFocus
End Sub
0
 

Author Closing Comment

by:Whing Dela Cruz
Comment Utility
Thanks to you,
the code is working...
More Power!
0
 
LVL 11

Expert Comment

by:Antagony1960
Comment Utility
Glad to have helped! :-)
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now