Add this function:
Code:
Public Function GetStringBetween(ByVal InputText As String, _
ByVal StartText As String, _
ByVal EndText As String, _
Optional ByVal StartPosition = 1) As String
'Standard Function as supplied by Mumei - NOT case sensitive and uses mid, not mid$
Dim lnTextStart As Long
Dim lnTextEnd As Long
lnTextStart = InStr(StartPosition, InputText, StartText, vbTextCompare) + Len(StartText)
lnTextEnd = InStr(lnTextStart, InputText, EndText, vbTextCompare)
If lnTextStart >= (StartPosition + Len(StartText)) And lnTextEnd > lnTextStart Then
'we've found the entry
GetStringBetween = Mid(InputText, lnTextStart, lnTextEnd - lnTextStart)
Else
GetStringBetween = ""
End If
End Function
Here's how to make success/failed
Code:
Buffer = WebBrowser3.Navigate ("http://www.mycoke.com/sumo.do?screenname=" + Text1.Text + "&prize=3")
If code="0" = GetStringBetween(Buffer, "<result", "/>") Then
lblStatus = "Success"
Else
lblStatus = "Failed"
End If
UNTESTED