「待ち受けは最重要テーマって言うから身構えてたんだけど、結局この数行をNavigate2の後に挿入しておけば大丈夫、ってことかな……?」
'サンプル4.2.5_フレーム構造の画面を待ち受ける
Public Sub waitFrame1()
Dim ie As
InternetExplorer
'IE起動→フレーム待ちうけテスト画面に遷移
Set ie =
CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate2
"http://macrogirls.net/sample/frame.html"
'待ちうけ
Do While ie.Busy Or
ie.ReadyState < READYSTATE_COMPLETE
Debug.Print ie.Busy & "/" & ie.ReadyState
DoEvents
Loop
'フォームに値をセット
ie.document.frames("Frame3").document _
.forms("TargetForm").elements("TargetText").Value
= "ぼたもち おはぎ 違い"
End Sub