|
-
Feb 12th, 2004, 03:17 PM
#1
Thread Starter
Junior Member
Highlighting text when tabbing
When my form loads, I want zero's in some of my textboxes (these are numeric fields that the user seldom inputs data into). I would like the zeros to be highlighted when the user tabs to that textbox so that the zero will be replaced by the user's input when they begin to type. Is there an easy way to do this?
Thanks,
bsac4
New to VB
-
Feb 12th, 2004, 03:21 PM
#2
Place this code in the GotFocus event (obviously change TextBox to the appropriate name).
TextBox.SelStart=0
TextBox.SelLength = Len(TextBox.Text)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|