How to check what the first 10 letters of a string are

G

Gary

I am using vartext and split to read in one line at a time the data
from a text box.

I would like to know how to check if vartext(1) starts with the phrase
"Company in"

Thank you,

Gary.
 
B

Brendan Reynolds

I'm assuming 'vartext' is an array? If so ...

If Left$(vartext(1), 10) = "Company in" Then

See 'Left Function' in the help file for details.
 
Top