View Single Post
(#8)
Old
DefectiveProduct is Offline
The Best
DefectiveProduct is on a distinguished road
 
Posts: 771
Join Date: Jul 2006
Location: O_o
Default 07-15-2006, 02:21 PM

Sorry for the double post but I looked over 3.0 and found that the browser buttons shut down the program and give you an error when they have nowhere to navigate.

You can prevent this by adding a line of On error resume next before each coding for the browser buttons.

Like,

Code:
Private Sub BtnBack_Click()
On error resume next
Webbrowser.GoBack
End Sub
That way it skips on error and you can click the buttons all you want without killing the program.

EDIT: And maybe you could include a KeyDown function that makes the browser navigate when you hit enter in the URL bar.
Code:
Private Sub TxtUrlBar_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
If KeyCode = vbKeyReturn Then
Browser.Navigate TxtUrlBar.Text
End If
End Sub







Last edited by DefectiveProduct : 07-15-2006 at 02:26 PM.
Reply With Quote