I think "code" format in the forum is lame. Mark's programme is a very good one, I used it for the first time today! Mark one suggestion... 'Check the current word against all the words in the keywords list For i = 0 To intWordCount If LCase(sWord) = strKeyWords(i) Then sWord = Chr(Asc(Left(sWord, 1)) - IIf(Asc(Left(sWord, 1)) < 97, 0, 32)) & Right(sWord, Len(sWord) - 1) 'My Line 'If you have a match, color it the color that is stated in the keyword color box IsKeyWord = "'#" & txtKeyword.Text & "'>" & sWord & "" blnIsKey = True Exit For End If Next i In IsKeyWord function if you add "My Line", the keywords, if the first letter of them is in lower case, will get converted into upper case. I hope you get the idea. You have converted Keywords to lower case for the sake of comparison, you can use this method or load keywords directly from the text file. If you use my line, keywords like 'dateserial' will be converted into 'Dateserial' (and not DateSerial). But keywords like 'dim' will be converted into 'Dim'.
___________________________________ You can see my projects in my homepage!
|