2003 Macro not working in 2007

K

kintaro

Can someone please help. I have macro for IE automation in 2003 but I do not
know VBA. Here is the code that works in 2003 but will not run in 2007. Does
anyone know what the new code would be for Excel 2007.

This is the VBA code
Dim objIE As Object
Set objIE = CreateObject("InternetExplorer.Application")
With objIE
.Navigate "http://mywebsite.com"
Do While .Busy: DoEvents: Loop
Do While .ReadyState <> 4: DoEvents: Loop
.Visible = True

This is where Excel 2007 gets stuck.
Do While .ReadyState <> 4: DoEvents: Loop

Then it gets stuck here.
..Document.getElementById("Description").Value = ActiveCell.Value

Any help with translating this from 2003 to 2007 would be greatly appreciated.
 
B

Barb Reinhardt

I suspect you're missing a reference to Microsoft Internet Controls. Look
under Tools -> References in the VBE and verity.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top