Sub Maerf001()
Dim iee As InternetExplorer
Set iee = CreateObject("InternetExplorer.application")
iee.Visible = True
iee.navigate ("某網頁網址")
Do While iee.readyState <> READYSTATE_COMPLETE
Loop
'這裡要怎麼寫才能控制IE點選"連接2"呢?求高手教導
Do While iee.readyState <> READYSTATE_COMPLETE
Loop
iee.ExecWB 17, 2
iee.ExecWB 12, 2
Range("A1").Select
Selection.PasteSpecial
End Sub
大概會是這樣
Dim webAs As object, webA As Object
'略...
Do While iee.readyState <> READYSTATE_COMPLETE
Loop
Set webAs = iee.document.GetElementsByTagname("a")
For Each webA in webAs
If webA.InnerText = "連接2" Then
webA.Click
exit for
End if
Next