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

x
?
Solved

Puting the cursor to the right

Posted on 2009-04-02
3
Medium Priority
?
269 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
[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
3 Comments
 
LVL 11

Accepted Solution

by:
Antagony1960 earned 2000 total points
ID: 24050718
Private Sub cmd1_Click()
Text1.SelStart = Len(Text1.Text)
Text1.SetFocus
End Sub
0
 

Author Closing Comment

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

Expert Comment

by:Antagony1960
ID: 24050805
Glad to have helped! :-)
0

Featured Post

Industry Leaders: 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

604 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