Results 1 to 2 of 2

Thread: detecting word "private"

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    183

    Angry

    Thanks for all the help so far everyone the first part worked out really well!

    I have another rich text box that you can type directly into, I want it to detect whenever the word "private" is entered, change the font color of "private" to blue and return the cursor to its original place and font color.

    The coding yesterday really helped, but I could't make it work very well for situations where the user is typing. Any additional help here would be really appreciated!!

  2. #2
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Gig Harbor, WA; Posts: 89950
    Posts
    360

    Cool

    I am not sure if this will help but you can apply a variable to the
    contents of the text box. Then see if the variable = "Private"...or use the instr function.

    if strName = "Private" then
    txtBox.forecolor = vbRed
    end if

    You may want to add the vbPropercase, because the text box will be case sensitive. private <> Private etc.
    I hope this helps!
    Lee
    Mahalo
    VB6(SP5), VC++, COBOL, Basic, JAVA
    MBA, MCSD, MCSE, A+
    Computer Forensics

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width