944,050 Members | Top Members by Rank

Ad:
Jul 12th, 2005
0

VB6 RTE '424' Object required.

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

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub cmdback_Click()
  2. On Error Resume Next
  3. WebBrowser1.GoBack
  4. End Sub
  5.  
  6. Private Sub cmdForward_Click()
  7. On Error Resume Next
  8. WebBrowser1.GoForward
  9. End Sub
  10.  
  11. Private Sub cmdgo_Click()
  12. WebBrowser1.Navigate (txturl.Text)
  13. End Sub
  14.  
  15.  
  16.  
  17. Private Sub cmdRefresh_Click()
  18. On Error Resume Next
  19. WebBrowser1.Refresh
  20. End Sub
  21.  
  22. Private Sub cmdStop_Click()
  23. On Error Resume Next
  24. WebBrowser1.Stop
  25. End Sub
  26.  
  27. Private Sub Timer1_Timer()
  28. Form1.Caption = WebBrowser1.LocationName
  29. End Sub

When i try to open the compiled .exe the error:
Run-time Error '424'
Object required.
Pops up, any ideas?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Drakey is offline Offline
1 posts
since Jul 2005
Jul 12th, 2005
0

Re: VB6 RTE '424' Object required.

have you tried running it in the VB IDE? If not, you might try that, and tell us which line gets highlighted....
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Aug 12th, 2005
0

Re: VB6 RTE '424' Object required.

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.
_/
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Blake15487 is offline Offline
1 posts
since Aug 2005
Aug 16th, 2005
0

Re: VB6 RTE '424' Object required.

put this on a form. six command buttons one row on top,one textbox below buttons,one webbrowser window below textbox
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1.  
  2. Private Sub Command1_Click()
  3. WebBrowser1.Navigate Trim(Text1.Text)
  4. End Sub
  5.  
  6. Private Sub Command2_Click()
  7. On Error Resume Next
  8. WebBrowser1.GoBack
  9. If Err.Number = -2147467259 Then MsgBox "You have not been anywhere to go back to.", vbInformation, "Wake up."
  10. End Sub
  11.  
  12. Private Sub Command3_Click()
  13. On Error Resume Next
  14. WebBrowser1.GoForward
  15. If Err.Number = -2147467259 Then MsgBox "You have not been anywhere to go forward to.", vbInformation, "Wake up."
  16.  
  17. End Sub
  18.  
  19. Private Sub Command4_Click()
  20. WebBrowser1.Refresh
  21. End Sub
  22.  
  23. Private Sub Command5_Click()
  24. WebBrowser1.GoHome
  25. End Sub
  26.  
  27. Private Sub Command6_Click()
  28. WebBrowser1.GoSearch
  29. End Sub
  30.  
  31. Private Sub Form_Load()
  32. Text1.Text = "http:\\www.google.com"
  33. Command1.Caption = "GO"
  34. Command2.Caption = "BACK"
  35. Command3.Caption = "FORWARD"
  36. Command4.Caption = "REFRESH"
  37. Command5.Caption = "HOME"
  38. Command6.Caption = "SEARCH"
  39. WebBrowser1.GoHome
  40. End Sub
  41.  
  42. Private Sub Form_Resize()
  43. Dim x As Integer
  44. x = Me.Width / 6
  45. Command1.Width = x
  46. Command2.Width = x
  47. Command3.Width = x
  48. Command4.Width = x
  49. Command5.Width = x
  50. Command6.Width = x
  51.  
  52. Command2.Left = 0
  53. Command3.Left = Command2.Width + Command2.Left
  54. Command4.Left = Command3.Width + Command3.Left
  55. Command5.Left = Command4.Width + Command4.Left
  56. Command6.Left = Command5.Width + Command5.Left
  57. Command1.Left = Command6.Width + Command6.Left
  58.  
  59. Text1.Width = Form1.Width
  60. WebBrowser1.Width = Form1.Width
  61. WebBrowser1.Height = Form1.Height
  62.  
  63. End Sub
  64.  
  65. Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
  66. If KeyCode = 13 Then WebBrowser1.Navigate Text1.Text
  67. End Sub
  68.  
  69. Private Sub WebBrowser1_TitleChange(ByVal Text As String)
  70. Form1.Caption = WebBrowser1.LocationURL & " " & WebBrowser1.LocationName
  71. Text1.Text = WebBrowser1.LocationURL
  72. End Sub
Reputation Points: 20
Solved Threads: 5
Junior Poster
jwshepherd is offline Offline
123 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: vb
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: SQL Server 2000 and VB 6





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC