EXCEL vba 运行错误438

打开网页还没有问题,不懂为什么加个do while/ debug.print就提示
运行错误 438,对象不支持该属类或方法,我用的EXCEL2013版,WIN7-64BIT
这是错误代码 :
Sub BrowseToSite()

Dim IE As New SHDocVw.InternetExplorer

'Set IE = New SHDocVw.InternetExplorer

IE.Visible = True
IE.navigate "www.baidu.com"

Do While IE.ReadyState <> READYSTATE_COMPLETE
Loop

Debug.Print IE.Location; IE.LocationURL

    大家有这个问题吗?  求解决方法或者思路!~

Dim IE As New SHDocVw.InternetExplorer

'Set IE = New SHDocVw.InternetExplorer

IE.Visible = True
IE.navigate "www.baidu.com"

Do While IE.ReadyState <> READYSTATE_COMPLETE
Loop

On Error Resume Next
Do While Err.Number = 438
Debug.Print IE.Location; IE.LocationURL
Loop
On Error Goto 0

后来发现在模块里面运行 会没有这个问题!

问题解决了!谢谢啊 !!!!