+ Reply to Thread
Results 1 to 13 of 13

Find Method error: -Object variable with block set variable not set

  1. #1
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Find Method error: -Object variable with block set variable not set

    Hi all again
    I have a code exported from other wb which worked normally.
    When it was imported into new wb Find method gives an error RunTime 91 Object variable with block set variable not set

    Please Login or Register  to view this content.
    I just want to find column number of today's date and us it in Cells()
    I was able to do it on old wb but not here

    Thanks in advance...
    Last edited by bambino_32; 06-01-2010 at 04:03 PM. Reason: SOLVED!!!!!!!!!!!!!!!!!!!!!!!!

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Find Method error: -Object variable with block set variable not set

    Can't tell what your variables are declared as,nor what value you have given to say Mydate
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: Find Method error: -Object variable with block set variable not set

    Here are declared valriables
    Please Login or Register  to view this content.
    TDayButton is OptionButton name. It checks if it's selected

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Find Method error: -Object variable with block set variable not set

    The reason for the error is that the date was not found, so the range returned by the Find is Nothing, and Nothing doesn't have a Column property.

    If the date is actually there, then you might try

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: Find Method error: -Object variable with block set variable not set

    he reason for the error is that the date was not found
    The date is there and unfortunately it didn't work

    I'm working at dummy so I upload one soon...
    Thanks al lot

  6. #6
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: Find Method error: -Object variable with block set variable not set

    Here's the dummy
    This userform is used just to add hours to workers
    Attached Files Attached Files
    Last edited by bambino_32; 05-31-2010 at 01:42 PM.

  7. #7
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: Find Method error: -Object variable with block set variable not set

    oh guys please help me. it's very important for me....((((

  8. #8
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: Find Method error: -Object variable with block set variable not set

    bump
    please))))

  9. #9
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: Find Method error: -Object variable with block set variable not set

    bump((((((((((((((((((((

  10. #10
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: Find Method error: -Object variable with block set variable not set

    bumping last time........

  11. #11
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Find Method error: -Object variable with block set variable not set

    Maybe to try declare MyDate as long and use this instead of TDateCNum = Cells.Find(What:=CDbl(MyDate), LookIn:=xlValues).Column

    Please Login or Register  to view this content.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  12. #12
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: Find Method error: -Object variable with block set variable not set

    God Bless you Vusal
    Thank you very Much!!!!!!
    Yes It solved my issue Thanks again
    You are genius!!!!!!!!!!!!!!)))))))))))))))))))))
    rep+

  13. #13
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Find Method error: -Object variable with block set variable not set

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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