如何最好地关闭窗户? objectInternetExplorer.close
不起作用并给我一个运行时错误'438':对象不支持此属性或方法。这是因为objectInternetExplorer
是IE窗口而不是我发布的图像(您正在查看的网页正在尝试关闭标签页)。这是我的代码:
objectInternetExplorer.Document.All.Item("submit.button").Click 'This clicks the submit button on the webpage
Application.Wait (Now + TimeValue("0:00:02")): DoEvents 'Wait two seconds.
''THEN VIEW THE IMAGE for the current point of the macro. "The Webpage you are viewing is trying to close the tab.
SendKeys "{ENTER}", True 'To click OK