Error 424

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • honchoyuk
    New Member
    • Jul 2007
    • 1

    Error 424

    Dear all,

    I am new to VB6. I have write the following code


    Sub btn_click()


    on error goto errhandler
    debug.print error.count
    errhandler:
    ....
    End Sub


    When the program go to debug.print error.count. VB prompts
    error 424 "object required"


    What should I do to let the program run normally. I have try
    to dim error as new Errobject.
    But it does not work. Or should I add reference (that is for error) to
    the project? Please help.
    Thanks.
  • shaileshb
    New Member
    • Jun 2007
    • 27

    #2
    hi

    you need to change your code
    bcoz there is no "error" object
    you can write ur code like given below

    sub btn_click()
    on error goto errhandler
    debug.print err.number
    exit sub
    errhandler:

    end sub

    err object doesn't have count property
    you can find other properties and methods like Number, Description, Source etc...

    just check it out and if any problem just submit

    Comment

    Working...