Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Selecting part text in a textbox

Hi I have been trying to select a part of a text entry into a textbox, I
tried to use selstart etc I can remove the text but not hightlight it can
someone show me how this can be done.
TIA
Charles
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default Selecting part text in a textbox

Hi Charles

With TextBox1
.Text = "Harald says cool, man"
.SelStart = 12
.SelLength = 4
End With

HTH. best wishes Harald

"vqthomf" skrev i melding
...
Hi I have been trying to select a part of a text entry into a textbox, I
tried to use selstart etc I can remove the text but not hightlight it can
someone show me how this can be done.
TIA
Charles



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Selecting part text in a textbox

I tried to doing it like this but I still can get it to select the text, if
the user enters let say more than 5 digits I want to highlight the extra
digits to give the user a chance to view or delete it.
Regards
Charles

"Harald Staff" wrote:

Hi Charles

With TextBox1
.Text = "Harald says cool, man"
.SelStart = 12
.SelLength = 4
End With

HTH. best wishes Harald

"vqthomf" skrev i melding
...
Hi I have been trying to select a part of a text entry into a textbox, I
tried to use selstart etc I can remove the text but not hightlight it can
someone show me how this can be done.
TIA
Charles




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default Selecting part text in a textbox

Did my code not work ?
Exactly when and how do you want this to happen, are you calling the code
from an event ? Which event ?
Do you have some annoying messagebox prior to this action ? Don't.
Seeing your code would help me help you.

Best wishes Harald

"vqthomf" skrev i melding
...
I tried to doing it like this but I still can get it to select the text, if
the user enters let say more than 5 digits I want to highlight the extra
digits to give the user a chance to view or delete it.
Regards



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Selecting part text in a textbox

Harald I do have a message explaining that the user has entered more or less
than 5 digits but I also wanted to highlight the part that is extra.
Charles

"Harald Staff" wrote:

Did my code not work ?
Exactly when and how do you want this to happen, are you calling the code
from an event ? Which event ?
Do you have some annoying messagebox prior to this action ? Don't.
Seeing your code would help me help you.

Best wishes Harald

"vqthomf" skrev i melding
...
I tried to doing it like this but I still can get it to select the text, if
the user enters let say more than 5 digits I want to highlight the extra
digits to give the user a chance to view or delete it.
Regards






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Selecting part text in a textbox

Sure, go a head, highlight the extra parts. My code sample showed you how to
do it.

Best wishes Harald


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
Selecting right part of text string Sue Compelling Excel Worksheet Functions 5 November 5th 09 07:54 PM
Selecting All Text in TextBox DRKML Excel Programming 1 April 12th 05 12:07 PM
Help: selecting part of an array Philbyinsydney Excel Programming 1 March 5th 04 01:15 AM
Selecting or Entering a Textbox Todd Huttenstine[_2_] Excel Programming 2 January 19th 04 06:09 PM
Selecting used part of a range HBS Excel Programming 3 December 11th 03 10:37 PM


All times are GMT +1. The time now is 07:52 AM.

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

About Us

"It's about Microsoft Excel"