Library Reference Changing Automatically

Gary McMaster

Well-known Member
Joined
Feb 8, 2009
Messages
1,978
Hi Everyone,

I was using the code below last evening with great success. While trying to continue with it today, it is failing.

The system is automatically changing my reference to shdocvw.dll to ieframe.dll. I haven't changed a thing since the last time it ran successfully. I'm getting "Automation error, the object invoked has disconnected from its clients". Anyone know what is happening?

I'm using Excel 2007 with Vista Home Premium.

Thanks for any advice.

Gary :confused:


'Microsoft Internet Controls - C:\Windows\System32\shdocvw.dll
'Microsoft HTML Object Library - C:\Windows\System32\mshtml.tlb

Dim oInetExp As InternetExplorer
Dim oDocument As HTMLDocument

Dim oLink As HTMLLinkElement
Dim oCell As Range

Set oCell = ThisWorkbook.ActiveSheet.Cells(1, 1)

Set oInetExp = New InternetExplorer

oInetExp.Visible = False
'oInetExp.Visible = True

oInetExp.navigate "http://www.yahoo.com/"

Do

If oInetExp.readyState = READYSTATE_COMPLETE Then

Exit Do

End If

Loop

Set oDocument = oInetExp.Document

For Each oLink In oDocument.links
oCell.Value = oLink
Set oCell = oCell.Offset(1, 0)
Next

oInetExp.Quit
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Findings:

The culprit was "Protection Mode" in Windows Vista.

Internet Options
Security Options
Enable Protected Mode = Uncheck

When I switch it off, the code runs as expected. I tried dozens of samples from this, and other sites. Absolutely nothing works with the said switch turned on.

Apparently the switching .dll files had nothing to do with my problem.

I hope no one else gets burnt.

Gary
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,812
Members
449,048
Latest member
greyangel23

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