'サンプル3.5.1_ボタンをクリックする
Public Sub
clickButton()
Dim ie As
InternetExplorer
Dim htdoc As
HTMLDocument
Dim InputElements As
Object
Dim InputElement As
HTMLInputElement
'操作対象Web画面を取得
Set ie =
Day2.getIE("ボタンやリンクの例")
'ドキュメントを取り出す(参照設定:Microsoft HTML Object
Library)
Set htdoc =
ie.Document
'ドキュメントに含まれるすべてのInput要素を取り出す
Set InputElements =
htdoc.getElementsByTagName("INPUT")
'すべてのInput要素内の値を出力する
For Each InputElement In
InputElements
If InputElement.Value = "Yahoo!へ"
Then
InputElement.click
Exit For
End
If
Next
End Sub