Refresh a Browser Window
Someone in the public groups asked how to refresh a particular IE browser window. This is what I came up with, maybe there’s a better way. You have to set a reference to Microsoft Internet Controls to use this sub.
Sub Refreshbrowser()
Dim i As Long
Dim SWs As New SHDocVw.ShellWindows
For i = 0 To SWs.Count - 1
If SWs(i).document.url = _
”http://www.dicks-clicks.com/Excel.htm” Then
SWs(i).Refresh
Exit For
End If
Next i
End Sub
Certain comments are subject to moderation and may not appear immediately. You can use HTML tags in your comment. If you include a greater-than or less-than sign or anything else that could be interpreted as HTML, your comment won't look nice. You need to escape those characters. To post VBA code in your comment, use [VB] tags, like this: [VB]Code goes here[/VB].
Leave a comment