ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   highlighting part of string? (https://www.excelbanter.com/excel-programming/350598-highlighting-part-string.html)

Ouka[_31_]

highlighting part of string?
 

Hi all,

I have a comma deliniated textbox value error checker

i.e. my procedure checks that all comma delinated values in a userform
textbox control are valid. If not, a message box comes up informing
the user of the invalid entry and the procedure is exited.

I would like to have the invalid text within the textbox highlighted.
Is this possible? If so, how would it be done?


--
Ouka
------------------------------------------------------------------------
Ouka's Profile: http://www.excelforum.com/member.php...o&userid=23988
View this thread: http://www.excelforum.com/showthread...hreadid=501924


Bob Phillips[_6_]

highlighting part of string?
 
With TextBox1
.SelStart = 5
.SelLength = 3
.SetFocus
End With

--
HTH

RP
"Ouka" wrote in message
...

Hi all,

I have a comma deliniated textbox value error checker

i.e. my procedure checks that all comma delinated values in a userform
textbox control are valid. If not, a message box comes up informing
the user of the invalid entry and the procedure is exited.

I would like to have the invalid text within the textbox highlighted.
Is this possible? If so, how would it be done?


--
Ouka
------------------------------------------------------------------------
Ouka's Profile:

http://www.excelforum.com/member.php...o&userid=23988
View this thread: http://www.excelforum.com/showthread...hreadid=501924





All times are GMT +1. The time now is 08:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com