| 
    
     |  | IEで起動済みの画面にエクセルの特定のセルの値を反省させたいです。 下記、ネットから参考にしたのですが
 最後のie.document〜のところで
 オブジェクト変数またはwithブロック変数が設定されていません。と出ました。
 原因分かりますでしょうか?
 
 Sub test()
 Dim ie As InternetExplorer
 Dim sh As Object
 Dim win As Object
 Dim DocumentTitle As String
 
 Set sh = CreateObject("Shell.Application")
 
 For Each win In sh.Windows
 DocumentTitle = ""
 On Error Resume Next
 DocumentTitle = win.document.title
 On Error GoTo 0
 If DocumentTitle = "" Then
 Set ie = win
 Exit For
 End If
 Next
 
 ie.document.getElementsByTagName("TITLE")(0).innerText = ""
 
 End Sub
 
 |  |