Sub test2()
Dim myIEo As Object
Set myIEo = CreateObject("internetexplorer.application")
With myIEo
.Visible = True
.navigate "https://tw.yahoo.com/"
Do While .Busy Or .ReadyState <> 4
DoEvents
Loop
End With
你要不要改用我的方法
1.先設定引用Microsoft Internet Controls
2.改用InternetExplorer物件去操作
Sub test2()
Dim myIEo As InternetExplorer
Set myIEo = New InternetExplorer
With myIEo
.Visible = True
.navigate "https://tw.yahoo.com/"
Do While .Busy Or .ReadyState <> 4
DoEvents
Loop
End With
End Sub