Results 1 to 5 of 5

Run-time error '91': Object variable or With block variable not set

Threaded View

  1. #1
    Registered User
    Join Date
    01-25-2009
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    7

    Run-time error '91': Object variable or With block variable not set

    Hi,

    Would anyone know how to resolve this error?

    It's this part of the code that's causing it.
    Selection.Find(What:="********REPORT********", After:=ActiveCell, _
            LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
            SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
        Range("A72:I72").Select
        Range(Selection, Selection.End(xlDown)).Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Delete Shift:=xlToLeft
    I essentially want to delete all rows including this one (based on the find search) to the end of the sheet,row1048576. It seems the way I have done this has restrictions on the row # (A72:I72) - This would change each day depending on the size of the report. I want to be able to just delete all information based on what row the find criteria is.

    I may have 2 issues, 1 being the error 91, and the other for selecting which rows to delete based on what row the find criteria is in.

    This is a work around to clean up a report that is in xml format. some companies just aren't up to speed in reporting (no csv, xsl, or text).

    Thanks for the help.
    Last edited by Leith Ross; 01-26-2009 at 12:07 AM.

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