Sub test()
Dim x
Dim oie As Object: Set oie = CreateObject("internetexplorer.application")
With oie
.Visible = True '我 要改 False 不顯示 表現
.Navigate "" ' 這是 要放網址嗎?? 如有 3個 網址...的話 該???
Do While .readystate <> 4 Or .busy: DoEvents: Loop
Set wshshell = CreateObject("wscript.shell")
Do
ret = wshshell.AppActivate("Microsoft Excel")
Loop Until ret = True
Application.Wait Now + 2 / 86400 '等待 2秒
ret = wshshell.AppActivate("Microsoft Excel")
If ret = True Then
ret = wshshell.AppActivate("Microsoft Excel")
Application.Wait Now + 2 / 86400
wshshell.SendKeys "{enter}"
End If
Application.Wait Now + 2 / 86400
Do While .readystate <> 4 Or .busy: DoEvents: Loop
.Quit
End With
End Sub