*bump*
Printable View
*bump*
*bump*
Try this:
VB Code:
Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean) If URL <> list1.list(x) then Cancel = True 'you could also add a page to go back to if a redirect is ' happening webbrowser1.navigate "url_here" End If End Sub
Also, you should make sure that the url's in the list box use the same format as the URL property does (http://www.site.com). If not, then you won't be able to make the comparison.