Click here to Skip to main content
15,667,014 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

This code works fine if i had browser IE6 or IE7.

But for IE8 it does not work...
It always results as "Not found"..
Updated 21-Apr-21 11:55am

I got the solution by trial & error:

On Page_Load i used to write my HTML string (strHTML) like..

& on FindButton_Click

this will alternate option of pressing Ctrl+F to find any string on Web Browser..

Now this code works fine for IE6 & IE7.
But if I have IE8 then "find window" is unable to find anything..

Now, if i wrote
WebBrowser1.DocumentText = strHTML

in Page_Load after writing my strHTML to WebBrowser, it worked for me..

I think the problem was that IE8 cant find where it has to find, since navigate URL is "about:blank" So, we have to specify "DocumentText" property..

But this is my guess only, if anybody know the exact reason plz post ur reply...
Share this answer
Dim doc As HTMLDocument
Set doc = frm.WebBrowser1.Document
SendKeys "^f", True
Share this answer
Richard Deeming 22-Apr-21 4:10am    
An unexplained code-dump in the wrong language - you are using VB6, whereas the OP was using VB.NET - is not a "solution" to this ancient and already-solved question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900