Thanks for the insight stevel05, it works well. On a different note, I came across a small issue generating the _TextChanged event sub from designer and it has parameter (text as string) and when the program ran, it gave me a
"java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.Exception: Sub codearea1_textchanged signature does not match expected signature."
In the end, I looked at your sample program and realized it should be:
"Sub CodeArea1_TextChanged(OldVal As String,NewVal As String)"
Just thought I mention as an fyi. Thanks a lot for your help.