Forum Discussion

mazhar555's avatar
mazhar555
Contributor
15 years ago

Closing Internet Explorer

Hi, i have a routine to close all Internet Explorer instances, i am using this routine in script extensions, some times it throws VB Exceptiop, kindly tell me if the foolwing routine has some problem.



Function CloseAllBrowser

    IExplore = Sys.FindAllChildren("ProcessName","iexplore",2)

     If UBound(IExplore)>=0 Then

  For i = 0 to UBound(IExplore)

           IExplore(i).Terminate

        Next

 End If

End Function





I have posted the same query early morning but i dont see it in the list so posting it again.



Regards,

12 Replies