Sub TestGetRunningIE()
Dim sws As SHDocVw.ShellWindows
Dim ie As SHDocVw.InternetExplorer
Set sws = New SHDocVw.ShellWindows
For Each ie In sws
Debug.Print ie.Name
Next
End Sub
For the above code to work, need to make a reference to shdocvw.dll, see below for the location:
When I moved this code in Vista SP1 Business it stopped working. Who would think that this is related to UAC :)... anyway just disable UAC and this code should work again. Note that on one of my machines it is working with UAC on :(....
See this post to disable UAC. This is only one of the methods to disable User Account Control.
~ts
2 comments:
Hi Iam Prabhu from chennai,joined today in this forum... :)
Thanks for dropping by.
Post a Comment