Run-Time Error 1004: Application-defined or object-defined error RRS feed

  • Question

  • Hello.  I am very new to Visual Basic and am trying to create a macro that will select and copy a name in one column (LAST, FIRST NAME)  from one column in one worksheet (Seniority List) and paste it to another column (Who) on another worksheet (Shift picks). I was then trying to copy the selected shift and pass days from the shift pick worksheet and paste it into the shift and pass days column in the seniority list worksheet.

    I am using relative references.  Maybe  I am not able to create a macro for the task I need to accomplish.  Here is my code.  The error is on the bolded line.  I imagine that there are other range errors throughout the rest of the code as well.  THanks in advance for any help:

    Sub Shift_Pick()
    ' Shift_Pick Macro

        ActiveCell.Offset(1, 1).Range("A1").Select
        Sheets("shift picks").Select
        ActiveCell.Offset(-11, 0).Range("A1").Select
        Application.CutCopyMode = False
        ActiveCell.Offset(0, -2).Range("A1:B1").Select
        Sheets("Seniority List").Select
        ActiveCell.Offset(0, 3).Range("A1:B1").Select
    End Sub

    Friday, August 3, 2012 1:39 PM

All replies

  • I think your activecell is in Row 11 or less.Then you are asking excel to offser backward 11 cell which is not possible.(Row number will be 0!!!!)

    BTH,what you are doing with so much activate.

    Asadulla Javed

    Friday, August 3, 2012 3:20 PM