Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub HilightText(ByVal sText as String)
'//sText will contain the textfile's contents
Dim iStart as Integer
Dim iEnd as Integer
Richtextbox1.Text = sText
iStart = 1
iEnd = 1
'//Loop through the text and find all instances of "Hello there!"
While iStart > 0
iStart = InStr(iEnd, sText, "Hello there!")
iEnd = iStart + Len("Hello there!")
'//Change the color of "Hello there!"
Richtextbox1.SelStart = iStart
Richtextbox1.SelLength = Len("Hello there!")
Richtextbox1.SelColor = RGB(255, 0, 0) '//or vbRed or &H0000FF&
Wend
End Sub
'//To use it
'--Open file
'--Read file contents
HilightText FileContents