+ Reply to Thread
Results 1 to 3 of 3

Runtime error 91 - Object variable or with block variable not set

  1. #1
    Registered User
    Join Date
    11-23-2007
    Posts
    65

    Runtime error 91 - Object variable or with block variable not set

    Hi guys,

    The following is an extract from quite a large macro. This part (more specifically the line CurRng2=CurRng1.Offset(1,0)) is generating the error "Object variable or with block variable not set". Can anyone explain why?

    Please Login or Register  to view this content.
    Thanks,

    Chris

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481
    Did CurRng1 actually find anything?

    Try testing it for nothing before using it.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671
    Replace this into your code
    Please Login or Register  to view this content.
    The old
    Please Login or Register  to view this content.
    also comes in handy

    You may Find this Nothing LOL
    Sorry for this poor translation from Dutch.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

+ 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