Results 1 to 5 of 5

Run time error - Method range of object failed message when trying to cut entire row

Threaded View

  1. #1
    Registered User
    Join Date
    12-31-2010
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    13

    Run time error - Method range of object failed message when trying to cut entire row

    I am new to excel macros and VBA. Here's my code. I'm trying to cut a row and paste it after the last cell in the previous row. It's getting hung up on the fourth line of the code.


     If PrevYear = CurrYear Then
               Selection.EntireRow.Cut
               Selection.Offset(-1, 0).Select
               Range(ActiveCell).End(x1LastColumn).Select
               Range(ActiveCell, ActiveCell.Offset(0, 1)).Paste
            End If
    Any help would be appreciated.
    Last edited by almilw; 01-04-2011 at 11:56 PM.

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