+ Reply to Thread
Results 1 to 5 of 5

Runtime error '91'

  1. #1
    Registered User
    Join Date
    08-20-2007
    Posts
    60

    Runtime error '91'

    Hello,

    I am trying to use Find function to locate a specific cell with the following code

    Please Login or Register  to view this content.
    Problem is, when I hide the column B, it doesn't work and gives me an error:

    Runtime error '91'. Object Variable or with block variable not set.

    If column B is not hidden, it works just fine, column B is used for just reference, that's the reason why I have this column as hidden. Is there any way to fix other than un hiding column B?

    Thanks, Anil

  2. #2
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302
    In my tests, hiding the column did not change anything.

    Not finding any matching cells in the .Find did give the Error 91.
    FrankBoston is the pen name for Andrew Garland, Lexington MA

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,642
    Hi All,

    I had the same problem as Anil - maybe it's to do with the Excel version - Excel 2000 here.

    Anyway, to avoid the runtime error just use the following code:

    Please Login or Register  to view this content.
    Hope this helps - please let me know how you get on.

    Best regards,

    Greg M

  4. #4
    Registered User
    Join Date
    08-20-2007
    Posts
    60
    Thanks a lot Greg et al. Sorry for the delay in responding back. My problem solved.

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,642
    Hi again Anil,

    Many thanks for the feedback. You're welcome - delighted to have helped.

    Regards,

    Greg M

+ 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