in pure vb code i recomend to replace all string manipulation functions, such as right, left, str, mid , etc .. for right$, left$, str$ mid$, lcase$, ucase$, etc ...
inside functions use a var that store the length or a string, dont use Len(myString) over and over in the same function ..... i...