IE7 launched via VBA won't load pages from google

tomsoyer

New Member
Joined
Mar 6, 2009
Messages
5
Hi,

I am trying to launch IE7 and load pages at google.com via VBA (VB6.3). While the following code can launch IE7 and load yahoo pages:

Sub test()
Dim objIE As InternetExplorer
Set objIE = New InternetExplorer
objIE.Visible = True
objIE.Navigate "http://www.yahoo.com"
End Sub

It doesn't work for any of the pages at www.google.com, i.e., IE7 hangs and won't load pages from google.com. This happens only if IE7 is launched via VBA. In addition, if one uses the above code to launch IE7 and then physically type www.google.com in the navigation bar, IE7 would just hang and won't load the google home page.

Does anyone know if this is a known issue. If so, is there a work around or fix? If not, then is this a bug?

Thanks,

Tom
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi
Welcome to the board

If you are working with IE 7, don't forget that it works by default in protected mode. Please confirm that you either:

- run IE in non-protected mode (I don't recommend it)
- you have added the site you are trying access to your list of trusted sites

You may have to close IE and restart it for the options to apply.
 
Upvote 0
Hi,

Thanks! IE7 was running in non-protected mode but google.com was not on the trusted site list. After I added it to the list, then the code worked. However, yahoo.com was not on the trusted site list either and it worked just fine. Is this normal behavior?

Also, is it possible to auto detect, via VBA, whether (a) google.com is on IE7's trusted site list, and (b) it's running non-protected mode?

Thanks very mcuh.

Tom
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top