Just remember if you're you doing a lot of text editing and you don't need the RTF stuff (colour etc) work with a string variable, the difference is huge,
so use
NOTCode:Dim MyStr as String Dim FindLoop as long MyStr = RTFBox.Text For FindLoop = 1 to 1000 Instr(1,"Hello",MyStr Next RTFBox.text = MyStr
I didn't test the code so I don't know if the function vars are in the right order but the difference in performance is HUGE, where possible don't work directly with RTFbox.textCode:Dim MyStr as String Dim FindLoop as long For FindLoop = 1 to 1000 RTFBox.Find(1,"Hello", MyStr) Next
Have a good one




Reply With Quote