Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Hopefully Simple runtime error 424 ...

LensmeisterLensmeister Posts: 48Member
Hi all,

Please can you help as I am completely lost.

I have a Excel file. in it I have a sheet with nothing on it but a rectangle that is a link to a Macro.

The macro is simple (or so I thought). Click the rectangle and it will open up a user form.

[code]
Option Explicit

Sub Rectangle3_Click()
frmMatchInsert.Show
End Sub

[/code]

But guess what! ... yep runtime error 424; object required.

The form name is frmMatchInsert so I can't see a problem. ALSO to add insult to injury I have got code for another file that is almost exactly the same (form name is the only change) and that runs ok.

Where have I gone wrong ?

Thanks for helping.

Lensmeister.

«1

Comments

  • PavlinIIPavlinII Posts: 404Member
    : Hi all,
    :
    : Please can you help as I am completely lost.
    :
    : I have a Excel file. in it I have a sheet with nothing on it but a rectangle that is a link to a Macro.
    :
    : The macro is simple (or so I thought). Click the rectangle and it will open up a user form.
    :
    : [code]
    : Option Explicit
    :
    : Sub Rectangle3_Click()
    : frmMatchInsert.Show
    : End Sub
    :
    : [/code]
    :
    : But guess what! ... yep runtime error 424; object required.
    :
    : The form name is frmMatchInsert so I can't see a problem. ALSO to add insult to injury I have got code for another file that is almost exactly the same (form name is the only change) and that runs ok.
    :
    : Where have I gone wrong ?
    :
    : Thanks for helping.
    :
    : Lensmeister.
    :
    :
    Hi,
    I've added empty form (UserForm1) and typed UserForm1.Show into module. Everything works fine. So I've damaged the name to xUserForm1.Show and I've recieved your error.
    Check, if your form exists in the same workbook and if it has EXACTLY name frmMatchInsert (try intellisence, if it knows it)



    [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]

    [purple]Don't take life too seriously anyway you won't escape alive from it![/purple]


  • LensmeisterLensmeister Posts: 48Member
    : : Hi all,
    : :
    : : Please can you help as I am completely lost.
    : :
    : : I have a Excel file. in it I have a sheet with nothing on it but a rectangle that is a link to a Macro.
    : :
    : : The macro is simple (or so I thought). Click the rectangle and it will open up a user form.
    : :
    : : [code]
    : : Option Explicit
    : :
    : : Sub Rectangle3_Click()
    : : frmMatchInsert.Show
    : : End Sub
    : :
    : : [/code]
    : :
    : : But guess what! ... yep runtime error 424; object required.
    : :
    : : The form name is frmMatchInsert so I can't see a problem. ALSO to add insult to injury I have got code for another file that is almost exactly the same (form name is the only change) and that runs ok.
    : :
    : : Where have I gone wrong ?
    : :
    : : Thanks for helping.
    : :
    : : Lensmeister.
    : :
    : :
    : Hi,
    : I've added empty form (UserForm1) and typed UserForm1.Show into module. Everything works fine. So I've damaged the name to xUserForm1.Show and I've recieved your error.
    : Check, if your form exists in the same workbook and if it has EXACTLY name frmMatchInsert (try intellisence, if it knows it)
    :
    :
    :
    : [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]
    :
    : [purple]Don't take life too seriously anyway you won't escape alive from it![/purple]
    :
    :
    :
    Thanks,

    I have just tried it again and still the same thing. I even copied the name (frmMatchInsert) and pasted it in to the code to make sure.

    Again Runtime Error '424' :(

    I also tried earlier changing the name completely to frmTrial2 and still gave me the error :(

    Think I am losing me marbles ;)


  • LensmeisterLensmeister Posts: 48Member
    : : Hi all,
    : :
    : : Please can you help as I am completely lost.
    : :
    : : I have a Excel file. in it I have a sheet with nothing on it but a rectangle that is a link to a Macro.
    : :
    : : The macro is simple (or so I thought). Click the rectangle and it will open up a user form.
    : :
    : : [code]
    : : Option Explicit
    : :
    : : Sub Rectangle3_Click()
    : : frmMatchInsert.Show
    : : End Sub
    : :
    : : [/code]
    : :
    : : But guess what! ... yep runtime error 424; object required.
    : :
    : : The form name is frmMatchInsert so I can't see a problem. ALSO to add insult to injury I have got code for another file that is almost exactly the same (form name is the only change) and that runs ok.
    : :
    : : Where have I gone wrong ?
    : :
    : : Thanks for helping.
    : :
    : : Lensmeister.
    : :
    : :
    : Hi,
    : I've added empty form (UserForm1) and typed UserForm1.Show into module. Everything works fine. So I've damaged the name to xUserForm1.Show and I've recieved your error.
    : Check, if your form exists in the same workbook and if it has EXACTLY name frmMatchInsert (try intellisence, if it knows it)
    :
    :
    :
    : [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]
    :
    : [purple]Don't take life too seriously anyway you won't escape alive from it![/purple]
    :
    :
    :
    Hi mate ...

    Ok no laffing now .... the form name was right BUT I had changed it so the form initialise was wrong !

    SELECT * FROM user WHERE MYBrain > 0 Return NULL !

    I might have another stoopid question soon. Thanks again for your help.


  • FazFaz Posts: 75Member
    Forget any complicated code, just set up a simple macro that shows the userform on run, then right click on the rectangle and assign the macro. When you click on the rectangle, the macro runs and the userform shows.
  • manishkdubeymanishkdubey Posts: 1Member
    HI,

    I am also facing the same prob. Same set of codes are running in one file. But as i insert exactly same codes in other file. runtime error24 object required reflects..

    Pls help me if you have go d solution.

    Regards,
    Manish


    : Hi all,
    :
    : Please can you help as I am completely lost.
    :
    : I have a Excel file. in it I have a sheet with nothing on it but a
    : rectangle that is a link to a Macro.
    :
    : The macro is simple (or so I thought). Click the rectangle and it
    : will open up a user form.
    :
    : [code]:
    : Option Explicit
    :
    : Sub Rectangle3_Click()
    : frmMatchInsert.Show
    : End Sub
    :
    : [/code]:
    :
    : But guess what! ... yep runtime error 424; object required.
    :
    : The form name is frmMatchInsert so I can't see a problem. ALSO to
    : add insult to injury I have got code for another file that is almost
    : exactly the same (form name is the only change) and that runs ok.
    :
    : Where have I gone wrong ?
    :
    : Thanks for helping.
    :
    : Lensmeister.
    :
    :

  • aronhugosaronhugos Posts: 6Member
    Hi,
    the error may occur when the Microsoft Access Object Library is not referenced.
    I suggest you trying edit the registry and reinstall Microsoft Office.

    Visit for more: [link=http://www.regmender.com/how-to-fix-runtime-error-424.html]How To Fix Runtime Error 424[/link]

    Hope this information is helpful for you.

    Regards,
    Aron
  • aronhugosaronhugos Posts: 6Member
    Hi,
    the error may occur when the Microsoft Access Object Library is not referenced.
    I suggest you trying edit the registry and reinstall Microsoft Office.

    Visit for more: [link=http://www.regmender.com/how-to-fix-runtime-error-424.html]How To Fix Runtime Error 424[/link]

    Hope this information is helpful for you.

    Regards,
    Aron
  • aronhugosaronhugos Posts: 6Member
    Hi,
    the error may occur when the Microsoft Access Object Library is not referenced.
    I suggest you trying edit the registry and reinstall Microsoft Office.

    Visit for more: [link=http://www.regmender.com/how-to-fix-runtime-error-424.html]How To Fix Runtime Error 424[/link]

    Hope this information is helpful for you.

    Regards,
    Aron
  • aronhugosaronhugos Posts: 6Member
    Hi, Regmender helps me fix the runtime error 424, I suggest try it.
  • aronhugosaronhugos Posts: 6Member
    Hi, Regmender helps me fix the runtime error 424, I suggest try it.
«1
Sign In or Register to comment.