How do I invoke the Find (On this Page) (^F) in Internet Explorer from a Command Button in an HTML document?

Posted on 2006-04-18
Last Modified: 2013-12-25
I hope someone can help me on this one since I'm relatively new to Visual Basic 6.0 .....

What I would like to do is have the user click on a command button which would invoke the Find (On This Page) feature in Internet Explorer. The questions I have are:

1) What type of project in Visual Basic 6.0 do I use to invoke the Find (On This Page) "^F" feature in Internet Explorer on a custom web page (DHMTL App, ActiveX IDE, ActiveX DLL, ActiveX Control, etc...)?

2) After doing some research on Sendkeys it seems that there may be some library(ies) that I need to call....If so then what do I need to declare?

3) How would the code look like in VB code?
Question by:HCAAdmin
    LVL 2

    Expert Comment

    if you want a browser embedded into your app, create a new project, go to components and tick "microsoft internet controls". drop the browser onto your form.

    you should be able to us:

    to pop up the find dialog box but good old microsoft has deliberately disabled it. take a look here:

    Author Comment

    Thanks to you I got some good ideas and a better understanding of VB 6.0......
    However I guess what I meant to say is that I need a macro button on my own web page that sends Ctrl+F to IE browser and invokes the Find (On This Page) prompt box to appear. I found javascript code that will generate a Find text box however our CEO really wants the IE version (CTRL+F) and javascript & php cannot invoke this since IE does not allow it......

    I've heard it's possible to do this using VB6.0 since it is a Microsoft product. Do you or anyone else know how to do this or even if it is possible?  
    LVL 2

    Accepted Solution

    it should be possible but microsoft has "disabled this behaviour" - by design of course! see

    i can't think of any other way of getting it to work but of course, if you're using a browser in vb, you can create a fairly extensive find function yourself.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now