954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

VB6 RTE '424' Object required.

Im trying to make a basic web browser with VB6, here is what i have:

Private Sub cmdback_Click()
On Error Resume Next
WebBrowser1.GoBack
End Sub

Private Sub cmdForward_Click()
On Error Resume Next
WebBrowser1.GoForward
End Sub

Private Sub cmdgo_Click()
WebBrowser1.Navigate (txturl.Text)
End Sub



Private Sub cmdRefresh_Click()
On Error Resume Next
WebBrowser1.Refresh
End Sub

Private Sub cmdStop_Click()
On Error Resume Next
WebBrowser1.Stop
End Sub

Private Sub Timer1_Timer()
Form1.Caption = WebBrowser1.LocationName
End Sub


When i try to open the compiled .exe the error:
Run-time Error '424'
Object required.
Pops up, any ideas?

Drakey
Newbie Poster
1 post since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

have you tried running it in the VB IDE? If not, you might try that, and tell us which line gets highlighted....

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

i have the same problem :( although i can tell you witch line is pissing VB off

Private Sub cmdgo_Click()
WebBrowser1.Navigate (txturl.Text)
End Sub

WebBrowser1.Navigate (txturl.Text)
___________
| .. ........ |
|(txturl.Text) |
|___________|
| _
\_____\ That bit there it (i cant seem to figure it out either.
_/

Blake15487
Newbie Poster
1 post since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

put this on a form. six command buttons one row on top,one textbox below buttons,one webbrowser window below textbox

Private Sub Command1_Click()
WebBrowser1.Navigate Trim(Text1.Text)
End Sub

Private Sub Command2_Click()
On Error Resume Next
WebBrowser1.GoBack
If Err.Number = -2147467259 Then MsgBox "You have not been anywhere to go back to.", vbInformation, "Wake up."
End Sub

Private Sub Command3_Click()
On Error Resume Next
WebBrowser1.GoForward
If Err.Number = -2147467259 Then MsgBox "You have not been anywhere to go forward to.", vbInformation, "Wake up."

End Sub

Private Sub Command4_Click()
WebBrowser1.Refresh
End Sub

Private Sub Command5_Click()
WebBrowser1.GoHome
End Sub

Private Sub Command6_Click()
WebBrowser1.GoSearch
End Sub

Private Sub Form_Load()
Text1.Text = "http:\\www.google.com"
Command1.Caption = "GO"
Command2.Caption = "BACK"
Command3.Caption = "FORWARD"
Command4.Caption = "REFRESH"
Command5.Caption = "HOME"
Command6.Caption = "SEARCH"
WebBrowser1.GoHome
End Sub

Private Sub Form_Resize()
Dim x As Integer
x = Me.Width / 6
Command1.Width = x
Command2.Width = x
Command3.Width = x
Command4.Width = x
Command5.Width = x
Command6.Width = x

Command2.Left = 0
Command3.Left = Command2.Width + Command2.Left
Command4.Left = Command3.Width + Command3.Left
Command5.Left = Command4.Width + Command4.Left
Command6.Left = Command5.Width + Command5.Left
Command1.Left = Command6.Width + Command6.Left

Text1.Width = Form1.Width
WebBrowser1.Width = Form1.Width
WebBrowser1.Height = Form1.Height

End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then WebBrowser1.Navigate Text1.Text
End Sub

Private Sub WebBrowser1_TitleChange(ByVal Text As String)
Form1.Caption = WebBrowser1.LocationURL & "  " & WebBrowser1.LocationName
Text1.Text = WebBrowser1.LocationURL
End Sub
jwshepherd
Junior Poster
123 posts since Jun 2005
Reputation Points: 20
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You