Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Highlight/Select text in User Form?

I have created a User Form for data entry, some of the boxes in which contain
text, as a guide of what to enter. Is there a way, when the user tabs to
these boxes, to highlight/select the text so it is overwritten when they
type, as opposed to the them manually selecting and deleting the text before
entering?

I'm sure I saw something somewhere, but I can't find it now when I need it
(typical!). Thanks,

Alan
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Highlight/Select text in User Form?

Private Sub TextBox1_Enter()
With Me.TextBox1
.SelStart = 0
.SelLength = Len(.Text)
.SetFocus
End With
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Alan Smith" wrote in message
...
I have created a User Form for data entry, some of the boxes in which
contain
text, as a guide of what to enter. Is there a way, when the user tabs to
these boxes, to highlight/select the text so it is overwritten when they
type, as opposed to the them manually selecting and deleting the text
before
entering?

I'm sure I saw something somewhere, but I can't find it now when I need it
(typical!). Thanks,

Alan



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Highlight/Select text in User Form?

Thanks Bob, that worked a treat!

"Bob Phillips" wrote:

Private Sub TextBox1_Enter()
With Me.TextBox1
.SelStart = 0
.SelLength = Len(.Text)
.SetFocus
End With
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Alan Smith" wrote in message
...
I have created a User Form for data entry, some of the boxes in which
contain
text, as a guide of what to enter. Is there a way, when the user tabs to
these boxes, to highlight/select the text so it is overwritten when they
type, as opposed to the them manually selecting and deleting the text
before
entering?

I'm sure I saw something somewhere, but I can't find it now when I need it
(typical!). Thanks,

Alan




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a new text box to user form Marilyn Excel Discussion (Misc queries) 3 May 13th 07 11:42 PM
Trying to select a specific range based on the time value of user form input Jitranijam New Users to Excel 8 November 15th 06 12:52 AM
User Form: Cannot Update Text Box Charles in Iraq Excel Discussion (Misc queries) 0 October 12th 06 07:53 AM
user form question: text box to display result BigPig Excel Discussion (Misc queries) 0 February 28th 06 12:33 AM
user form question: text box to display result BigPig Excel Worksheet Functions 0 February 25th 06 08:17 PM


All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"