I have posted a snippet of some working code.
Right now the only way to make it work is to set a reference to "microsoft internet controls". I want the code to be portable, so I tried to use late binding to eliminate the need for a reference. I can't figure out what to put into the createobject. line 13 fails
Function QuitIE() As Long
' returns number of quits performed (up to 50)
Dim shellWins As Object ' SHDocVw.ShellWindows
' this works Set shellWins = New SHDocVw.ShellWindows
Set shellWins = CreateObject("Shell.Application") '<===== (1) does NOT WORK
Dim explorer As SHDocVw.InternetExplorer ' (2) changing this to As Object does not help
Dim repeat As Boolean
repeat = False
' next line fails object does not support this method
For Each explorer In shellWins
I will give points to whoever can solve this particular problem.
But, I will give the Accepted Answer to anyone that can give me a general answer, In other words I want to be able to change working
set x = new wwwwwww.xxxxxx
into set x = createobject ("yyyyy.zzzzz") where w,x,y and z are anything