何回も実行するとオートメーションエラーが出るようだ。何回も実行する要件のプログラム書く時は.net使うべきだと思う。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Dim ieObject As Object Set ieObject = CreateObject( "InternetExplorer.Application" ) ieObject.Visible = True ieObject.Navigate "http://www.google.co.jp/" 'READYSTATE_COMPLETE=4です Do While ieObject.ReadyState <> 4 Or ieObject.Busy = True 'nop Loop ieObject.Document.getElementsByName( "q" )(0).Value = "test" ieObject.Quit Set ieObject = Nothing |