+ Reply to Thread
Results 1 to 12 of 12

Object required error on CommandButton Click

Hybrid View

  1. #1
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Object required error on CommandButton Click

    I have a CommanButton on a sheet that simply opens a UserForm, but I get a Run-time error 424.....Object required error. Can anyone tell me how to fix. I'm new to VBA. See code:
    Private Sub CommandButton1_Click()
        frmOrderEntryInfo.Show
    End Sub
    Last edited by rkjudy; 01-09-2011 at 06:28 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Object required error on CommandButton Click

    Nothing looks wrong there. Are you sure the name is correct?
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Re: Object required error on CommandButton Click

    I don't understand. The form name is correct. Could if be something to do with the properties of the form or the command button? Is there a missing object or something missing in Tools>References? This did work before. I did install the Analysis Toolpack add-in. It slowed down my workbook so much, I uninstalled it. Could this have done something?

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Object required error on CommandButton Click

    Is it possible to attach the workbook?

  5. #5
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    Re: Object required error on CommandButton Click

    It's probably something simple. Here's the workbook. Thanks, in advance for your help.
    Attached Files Attached Files

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Object required error on CommandButton Click

    Hello rkjudy,

    Well I sure can't see any reason for this not to work. Hopefullly one of the other members or a Forum moderator will help.

    On an aside and still being a rookie, it seems you could just use a regular forms button for a click type procedure versus the active x. Not entirely sure the difference. Guess I need to do some reading.

    Also, the slowness could be from the way you have your code. It appears you must have used the macro recorder to get most of your code. There is no need to use all of the Select/Selection.

    If you don't mind I will clean some of it up and send you a sample. In the meantime hopefully somebody will come to our rescue.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1