PC Review


Reply
Thread Tools Rate Thread

2003 Macro not working in 2007

 
 
kintaro
Guest
Posts: n/a
 
      27th Dec 2009
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.





 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      27th Dec 2009
I suspect you're missing a reference to Microsoft Internet Controls. Look
under Tools -> References in the VBE and verity.
--
HTH,

Barb Reinhardt



"kintaro" wrote:

> 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.
>
>
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formual not working when 2003 WKB saved as 2007 Macro Enabled WKB Corey .... Microsoft Excel Worksheet Functions 3 26th Mar 2009 05:44 AM
2003 macro working in 2007 - inserting a jpeg Dave Microsoft Excel Discussion 3 4th Dec 2008 11:10 PM
Simple Excel 2003 macro not working in Excel 2007 Bryan Microsoft Excel Programming 0 19th Jun 2008 02:33 PM
Excel 2007 Macro Help (Excel 2003 not working in 2007) Pman Microsoft Excel Misc 4 29th May 2008 06:29 PM
Macro in word 2003 not working in word 2007 vestlink Microsoft Word New Users 1 14th Mar 2008 11:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:38 PM.