Can someone explain to me SHDocVW?

Peter h

Active Member
Joined
Dec 8, 2015
Messages
414
In some code I wrote I use the lines:


Code:
Dim IE As InternetExplorerMedium
Set IE = New InternetExplorerMedium

But scrounging around the internet this morning I've seen people use SHDocVW.InternetExplorer. What is the difference in using the SHDocVW vs not using that? My code seems to run fine. Would I benefit from adding that to my code? Thanks.
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

ranman256

Well-known Member
Joined
Jun 17, 2014
Messages
1,900
SHDocVW is a direct call to the control that uses internet properties.
 

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
6,431
There's no difference between SHDocVw.InternetExplorer and InternetExplorer. SHDocVw is the name of the library available when you set a reference to Microsoft Internet Controls, of which InternetExplorer is one of its classes. You would only need to specify SHDocVw if the VBA project referenced another library with a class named InternetExplorer and you want SHDocVw's version of InternetExplorer.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,451
Messages
5,528,836
Members
409,839
Latest member
akashsadhu
Top