reading a google page using vba in access

have been using the code below but when i run it it throws up a  
compile error at line

Dim Browser As SHDocVw.InternetExplorer

not sure if this is a referance problem or what any ideas
or better code to do this

Dim Browser As SHDocVw.InternetExplorer
    Dim HTMLDoc As MSHTML.HTMLDocument

    Set Browser = New SHDocVw.InternetExplorer                     ' create a browser
    Browser.Visible = True                                         ' make it visible
    Application.StatusBar = ".... opening page"
    Browser.navigate ""                       ' navigate to page
    WaitForBrowser Browser, 10                                     ' wait for completion or timeout

    Application.StatusBar = "gaining control over DOM object"
    Set HTMLDoc = Browser.Document                                 ' load the DOM object
    WaitForBrowser Browser, 10

    ' at this point you can start working with the DOM object. Usefull functions are
    '     getElementByID(string)
    '     getElementsByTagName(string)
    '     getElementsByName(string)
    '     getAttribute(string)
    '     .setAttribute string, string     .... to change field values, click a button etc.

    Application.StatusBar = ""                                      ' time to clean up
    Set HTMLDoc = Nothing
    Set Browser = Nothing
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

When you look at your references, are there any that show up as missing?

You might try this late binding approach. Remove the broken reference.
Dim Browser As Object
set Browser = CreateObject("InternetExplorer.Application")

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sydneyguyAuthor Commented:
thanks for the help ended up going a better direction
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.