Results 1 to 3 of 3
  1. #1
    asearle is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2010
    Posts
    24

    Web Browser Control: Excel to MSA 2007 ?

    Hi Everyone,

    I have inherited an Excel application which incorporates a little (rather nice) Web Browser display and would like to get this working in MS-Access.

    So far I have been able to incorporate an ActiveX Web-Browser Control and am able to call up the basis for the display (a locally stored HTML file). This displays when called with the following syntax ...

    Me.WebBrowser1.Navigate ("C:\mydirectory\BrowserTest.html")



    So far so good.

    However, in the Excel application various commands (Javascript) are sent to this HTML file for execution. The syntax is the following ...

    Me.WebBrowser1.Document.parentWindow.execScript ("addCoords(51.43, 12.24, 'LEJ')")

    In this example coordiates on a map are declared.

    But when I try to excute this in Access VBA nothing seems to happen so I am assuming that the calling-syntax is simply not valid. I have tried various other permutations but so far without success.

    So can anyone help me out here? How should I send such commands/parameters to the HTML document displayed in my WebBrowser1 window?

    Any tips here would be a great help.

    Many thanks,
    Alan Searle

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Do you have some Error Handling code in your routine?

    I use the web browser control but haven't tried anything beyond simple navigate.
    I did find this link that has a download example. It may offer some help.

    http://blog.vishalon.net/index.php/m...tivex-control/

  3. #3
    asearle is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2010
    Posts
    24

    Solved !

    Hi Orange,

    Many thanks for the link !!!

    Yes, indeed the link included an excellent example that I was able to download and adapt. Fantastic!

    At a later point (with another mdb) I started getting error messages and found that I needed to add the following references ...

    "Microsoft Internet Controls" = SHDOCVW.DLL
    and
    "Microsoft HTML Object Library" = MSHTML.tlb

    Then it all worked fine.

    Thanks very much for the help

    Regards,
    Alan

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access 2007 - Form control with VBA
    By washington in forum Forms
    Replies: 1
    Last Post: 07-18-2011, 08:39 AM
  2. Web Browser Control
    By ctgann in forum Forms
    Replies: 5
    Last Post: 03-18-2011, 08:17 PM
  3. Web Browser Control Problem
    By ctgann in forum Forms
    Replies: 0
    Last Post: 03-06-2011, 06:09 AM
  4. Active X - Web Browser control doesn't work
    By forstatd in forum Reports
    Replies: 1
    Last Post: 06-02-2010, 10:56 PM
  5. Replies: 0
    Last Post: 11-17-2009, 02:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums