+ Reply to Thread
Results 1 to 4 of 4

Object required error

  1. #1
    Registered User
    Join Date
    07-25-2011
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    9

    Object required error

    I'm trying to get a new piece of code to work, by modifying a very useful section of code from Leith Ross. His original code is referenced below.
    Please Login or Register  to view this content.
    The only problem with that approach is that it always checks the same cell for the "END" trigger, when I need it to check the next cell. I modified it to the code below.
    Please Login or Register  to view this content.
    This should do the exact same thing, but this code should use the exact number of "c" required. The problem is that I get run-time error 424, object required. I can't figure out how my code is that much different that it wouldn't work.

    This code is all embedded in the cmdSelect button in userform1. Please reference original thread here.
    http://www.excelforum.com/excel-prog...d-trigger.html

    Thanks!

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,252

    Re: Object required error

    Hi,

    Add an Option Explicit statement to the top of your code module. This will highlight any undeclared variables.

    Looking at these lines of code in your revised procedure:
    Please Login or Register  to view this content.
    What is Cell and where is it given a reference to a range?
    You will also need to declare the variable 'c'.
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Registered User
    Join Date
    07-25-2011
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Object required error

    I actually got the following to work.

    Thanks for the tip!
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-25-2011
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Object required error

    I actually got the following to work.

    Thanks for the tip!
    Please Login or Register  to view this content.

+ 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