The above code works perfectly when it is put in the Click event function of a menu item but the same code generates an error saying Method 'Navigate' of object 'IWebBrowser2' failed when it is put in the Click event function of a CommandButton. Why?VB Code:
frmWebBrowser.WebBrowser1.Navigate "http://www.someurl.com"
Also where from is this IWebBrowser2 coming?
Note that using Navigate2 instead of Navigate also generates the same error when the code is put in the Click event function of a CommandButton.
Thanks,
Arpan




ARPAN
Reply With Quote