VB6 RTE '424' Object required.

Reply

Join Date: Jul 2005
Posts: 1
Reputation: Drakey is an unknown quantity at this point 
Solved Threads: 0
Drakey Drakey is offline Offline
Newbie Poster

VB6 RTE '424' Object required.

 
0
  #1
Jul 12th, 2005
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?
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: VB6 RTE '424' Object required.

 
0
  #2
Jul 12th, 2005
have you tried running it in the VB IDE? If not, you might try that, and tell us which line gets highlighted....
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1
Reputation: Blake15487 is an unknown quantity at this point 
Solved Threads: 0
Blake15487 Blake15487 is offline Offline
Newbie Poster

Re: VB6 RTE '424' Object required.

 
0
  #3
Aug 12th, 2005
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.
_/
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 121
Reputation: jwshepherd is an unknown quantity at this point 
Solved Threads: 5
jwshepherd's Avatar
jwshepherd jwshepherd is offline Offline
Junior Poster

Re: VB6 RTE '424' Object required.

 
0
  #4
Aug 16th, 2005
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
.: We may acquire liberty, but it is never recovered if it is lost :.
irc://irc.rizon.net/#itf
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC