Dear all,
I tried the following code to detect InternetExplorer. I have my IE running and run the code. But my prog return "can't detect IE"

Sub DetectIE()
Dim MyIE As Object

On Error GoTo NoIE
Set MyIE = GetObject(, "InternetExplorer.Application")
MsgBox "IE is running"
Exit Sub

NoIE:
MsgBox "can't detect IE"

End Sub


Please help me.
Thank you