+ Reply to Thread
Results 1 to 4 of 4

Runtime Error: 424 Object Required

  1. #1
    Registered User
    Join Date
    11-30-2012
    Location
    alberta, canada
    MS-Off Ver
    Excel 2010
    Posts
    39

    Runtime Error: 424 Object Required

    Hello,

    I seem to be struggling with what should be this simple bit of code:

    Please Login or Register  to view this content.
    I was previously using a select case statement but it was not working for me so I went with nested if statements.
    I can not seem to find what Is causing the problem and it is beginning to drive me crazy. Any help would be great.

    Have a great day,
    Sleepyshy

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Runtime Error: 424 Object Required

    Which line of code causes the error?

    One thing I can see that isn't quite right is this.
    Please Login or Register  to view this content.
    Controls is a collection of controls, but you seem to be referring to one control when you use ctrl.

    Try declaring ctrl like this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Runtime Error: 424 Object Required

    It's hard to say without seeing the userform. I don't think the issue is with the IF statements. My guess is one of the defined controls doesn't exist

    These two...
    Me.tb1
    Me.tb2


    Or these...
    UpdateBar.Controls("tb" & h & i)

    The above evaluates to
    tb11
    tb12
    tb13
    tb14
    tb15
    tb16
    tb21
    .
    .
    .
    tb85
    tb86

  4. #4
    Registered User
    Join Date
    11-30-2012
    Location
    alberta, canada
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Runtime Error: 424 Object Required

    Hello Again,

    I found what was wrong! It turns out that I shouldn't be writing code on little sleep which just causes to many problems. Now on with what actually was wrong.

    This is the updated code that now works. I have highlighted the areas that have changed:

    Please Login or Register  to view this content.
    Thank you Both for you help!
    Any questions just let me know and have a great day,
    Sleepyshy

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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