Run-time 424 Error Object Required

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheHeretic
    New Member
    • Sep 2008
    • 4

    Run-time 424 Error Object Required

    Ok I opened a new project in vb6 a form opened up and I double clicked it and inserted the following code:



    Private Sub Form_Load()
    win.RemoteHost = "irc.rizon. net"
    win.RemotePort = "6667"
    win.Connect
    End Sub


    Private Sub win_connect()
    win.SendData "NICK mouse1" & vbCrLf
    win.SendData "USER aaaa aaaa aaaa aaaa aaaa" & vbCrLf
    win.SendData "NICK mouse2" & vbCrLf
    win.SendData "USER aaaa2 aaaa2 aaaa2 aaaa2 aaaa2" & vbCrLf
    win.SendData "NICK mouse3" & vbCrLf
    win.SendData "USER aaaa3 aaaa3 aaaa3 aaaa3 aaaa3" & vbCrLf
    win.SendData "NICK mouse4" & vbCrLf
    win.SendData "USER aaaa4 aaaa4 aaaa4 aaaa4 aaaa4" & vbCrLf
    win.SendData "JOIN #whatever" & vbCrLf
    win.SendData "MODE #whatever +k" & vbCrLf
    End Sub


    On line 2 : win.RemoteHost = "irc.rizon. net"
    is where i get the runtime error. Why won't this code work?
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    which component you are using ?

    Comment

    • TheHeretic
      New Member
      • Sep 2008
      • 4

      #3
      Component? Not sure exactly what you mean, I'm am using mIRC

      Comment

      • TheHeretic
        New Member
        • Sep 2008
        • 4

        #4
        I was told that most likely there is no object named 'win' in my program, any solutions? I don't entirely know what that means

        Comment

        • xinariscy
          New Member
          • Sep 2008
          • 14

          #5
          win.RemoteHost

          RemoteHost is a function of win. win is an object and should be in your form somewhere. Where you can find it, or any further information look where you found the code.

          Comment

          • debasisdas
            Recognized Expert Expert
            • Dec 2006
            • 8119

            #6
            do you understand the code you are writing ?

            is that your own code ?

            if there is no object how are you using the properties and method of that object ?

            Comment

            • TheHeretic
              New Member
              • Sep 2008
              • 4

              #7
              well the code did work, so I moved on to greater projects now i never saved the working code, and I'm back to the same problem. I went to add componenets>win sock>checked it then the winsock toolbox came on an i put that in my form changed the 'Name' to 'Win" as aopposed to Winsock1 but I can't get the winsock controls to work. If I figured out the problem before I know it's possible, any help is appreciated

              Comment

              Working...