This is starting to piss me off!!!

I still can't get, but I found this and I'm pretty sure it will work but it gives me a Run-time error '6' "syntax error" And it highlights the exit...

Code:
open "path+file" for input as #1
do until eof(1)
input #1,name$
label.caption = name$
if name$ =textbox.text then v$="yes" exit do
loop