+ Reply to Thread
Results 1 to 2 of 2

VBA 1004 Error Deleting Rows or Columns

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-02-2008
    Location
    Berkeley, CA
    MS-Off Ver
    Windows 2007
    Posts
    105

    VBA 1004 Error Deleting Rows or Columns

    The following causes a "Error 1004 Method 'Range' of Object '_Worksheet' failed.
    I'm working in Excel 2003.

    Sub Delete_Data(SHEET as Worksheet, RangeStr)
        RangeStr = Make_Range(Row1, Col1, Row2, Col2)
         SHEET.Range(RangeStr).Delete Shift:=xlShiftUp             <-- Error occurs here
    RangeStr = "A4:LA24"

    So how do I fix it?
    Thanks,
    Mackerel
    Last edited by CaptMac; 10-04-2010 at 09:46 PM. Reason: Marking Solved

  2. #2
    Forum Contributor
    Join Date
    10-02-2008
    Location
    Berkeley, CA
    MS-Off Ver
    Windows 2007
    Posts
    105

    Re: VBA 1004 Error Deleting Rows

    The problem turned out to be that I was specifying a column larger than the work space.

    But I can't figure out how to mark this thread as "Solved"?

    Mac
    Last edited by CaptMac; 09-23-2010 at 03:55 PM. Reason: Problem solved but question

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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