>>644
hWndを比較しなくても、オブジェクトを比較すればいい。
On Error Resume Next
Dim SW As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer
For Each IE In SW
 If IE.Document.parentWindow.Document Is UserControl.Parent.Script.Document Then
  MsgBox IE.LocationURL
  Exit For
 End If
Next