Try this:
vb Code:
Option Explicit
Private Function getBonusFormTextBoxValue() As String
Dim oHTMLDoc As HTMLDocument, oEle As IHTMLElement, oForm As IHTMLFormElement, szValue As String
'<form action="/bonus.php" method="POST">
' <p class="center">Combination:<br />
' <img src="validate_image.php?id=907af914b95a0fc33c3f33bf6b4f1ec9f4b5c8207f8fc29522efe783d"
' alt="Validation Image" />
' </p>
' <p class="center">
' <input type="text" name="Validate" size="6" maxlength="6" />
' <br />
' <input type="submit" value="Enter Combination!" />
' </p>
'</form>
'<hr style="clear: both" />
'<p class="center"><img src="/graphics/pokemon/normal/393M.gif" alt="A Wild Pokémon!">
' <br />
' <strong style="color: red">Look out!</strong> A wild Pokémon has attacked you!<br />
' <a href="battle.php?Battle=Wild">Battle it now!</a>
'</p>
'<p> </p>
'<p class="center">
'WebBrowser1.navigate "about:blank"
Set oHTMLDoc = WebBrowser1.document
'oHTMLDoc.body.innerHTML = "<form action=""/bonus.php"" method=""POST""><p class=""center"">Combination:<br /><img src=""validate_image.php?id=907af914b95a0fc33c3f33bf6b4f1ec9f4b5c8207f8fc29522efe783d"" alt=""Validation Image"" /></p><p class=""center""><input type=""text"" name=""Validate"" size=""6"" maxlength=""6"" /><br /><input type=""submit"" value=""Enter Combination!"" /></p></form><hr style=""clear: both"" /><p class=""center""><img src=""/graphics/pokemon/normal/393M.gif"" alt=""A Wild Pokémon!""><br /><strong style=""color: red"">Look out!</strong> A wild Pokémon has attacked you!<br /><a href=""battle.php?Battle=Wild"">Battle it now!</a></p><p> </p><p class=""center"">"
szValue = vbNullString
For Each oForm In oHTMLDoc.Forms
If (InStr(1, oForm.Action, "bonus.php", vbTextCompare) <> 0) Then
For Each oEle In oForm.elements
If (oEle.isTextEdit) Then
If (LCase(oEle.Name) = "validate") Then
szValue = oEle.Value
Set oEle = Nothing
Set oForm = Nothing
Exit For
End If
End If
Next oEle
End If
If (oForm Is Nothing) Then Exit For
Next oForm
getBonusFormTextBoxValue = szValue
End Function
Private Sub Form_Load()
getBonusFormTextBoxValue
End Sub