「コードのことよ。エラーの原因はNavigate2、
つまり画面遷移が完了する前に検索テキストを入力しようとしたこと」
'サンプル4.2.1_画面遷移を待ち受ける
Public Sub
navigateAndSetValue()
Dim ie As
InternetExplorer
'IE起動→Googleに遷移
Set ie =
CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate2
"http://www.google.co.jp/"
'Googleのフォームに値をセットして検索実行
ie.document.forms("f").elements("q").Value
= "ぼたもち おはぎ 違い"
ie.document.forms("f").submit
End Sub