+ Reply to Thread
Results 1 to 7 of 7

Error 91, Stops at the Find statement.

  1. #1
    Registered User
    Join Date
    06-14-2011
    Location
    Västerås
    MS-Off Ver
    Excel 2010
    Posts
    14

    Error 91, Stops at the Find statement.

    Hi, im trying to acquire the row number of the word "#outputs" though im failing misserably, what am i doing wrong? I Always get the error "Object variable not set (Error 91)"

    Please Login or Register  to view this content.
    Last edited by Erik345; 06-14-2011 at 05:40 AM.

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

    Re: Error 91, Stops at the Find statement.

    Hi Erik,

    You're getting the error because it can't find a cell containing the word #outputs (it can't activate a cell it hasn't found).

    Looking at your code, I can see you putting #Inputs into the new worksheet, but I can't see you putting in #outputs anywhere. Is #outputs on a different sheet?
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Error 91, Stops at the Find statement.

    Did you know ?

    Please Login or Register  to view this content.



  4. #4
    Registered User
    Join Date
    06-14-2011
    Location
    Västerås
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Error 91, Stops at the Find statement.

    Thank you so much! I was starting to stare myself blind at the code.

  5. #5
    Registered User
    Join Date
    06-14-2011
    Location
    Västerås
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Error 91, Stops at the Find statement.

    Can i ask you one more thing?
    I've got this for-loop with an If statement inside of it. Though the condition seems to have faulty syntax.


    Please Login or Register  to view this content.
    Last edited by Erik345; 06-14-2011 at 08:02 AM.

  6. #6
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Error 91, Stops at the Find statement.

    HI Erik, does Gx, Hx, and so forth represent ranges? If so, declare them like:
    Please Login or Register  to view this content.
    . I think that is what is wrong.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

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

    Re: Error 91, Stops at the Find statement.

    Sure...

    I'm guessing what you want here, but this is a literal "translation" of your code:
    Please Login or Register  to view this content.

    If that's not what you want then please can you describe in words what you are trying to do?

    Also, are you sure that using Or rather than And is correct?

    Or ---> All of the cells in columns H, I, J, K, L must match column G, otherwise you get a message box saying "NUNNA"

    And---> Any of the cells in columns H, I, K, K, L can match column G, otherwise you get a message box saying "NUNNA"

+ 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