Instr() error!!

Hello
I try this, but gets an invalid procedure call or argument.
Do YOU know what I am doing wrong??


front = FreeFile
Open App.Path & "\temp\" & "file000.htm" For Input As #front

Do While Not EOF(front)

  Line Input #front, forside
  forside = LCase(forside)
  anker = InStr(0, forside, "<a href=")
  If anker < 0 Then
    ref = Mid$(forside, anker, InStr(anker, forside, ">", vbTextCompare) - anker)
  End If
 
Text1.Text = ref
Loop

---
that's it
freak022398Asked:
Who is Participating?
 
martiConnect With a Mentor Commented:
anker = InStr(1, forside, "<a href=")
0
 
topolCommented:
Where does it say it happenes?
What line?

0
 
freak022398Author Commented:
yep, that line.

No error now, but no input either....in the text1.text
??
what to do?
0
 
topolCommented:
Try to put forside=Str(forside) before Instr function.
And whether reject or accept marti's question.
0
 
freak022398Author Commented:
ok marti
got it working
thanks!!
/freak
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.