How to navigate to an already opened internet explorer window? (VBA)

后端 未结 2 2023
感动是毒
感动是毒 2021-01-28 16:54

so I\'ve been searching around the web a lot on how to do this and can\'t seem to find any concrete information on this. I\'ve seen a lot of examples on how to open a new intern

2条回答
  •  无人及你
    2021-01-28 17:33

    This does all browser windows both Internet Explorer and Windows Explorer

    Window is a Internet Explorer Window object.

    Set objShell = CreateObject("Shell.Application")
    Set AllWindows = objShell.Windows
    For Each window in AllWindows
        msgbox window.location
    Next
    

    Or if you are sure it's the only one open

    Set x = GetObject(,"InternetExplorer.Application")
    

提交回复
热议问题