error message when using code in excel 2007 / 2003

The code below works a treat in excel 2010, however when I tried this in excel 2007 or 2003, I get an error message on "  .Resize(, 13).ClearContents"

Please can you help.

Private Sub CommandButton3_Click()
Dim Password

Password = "abc"
If InputBox("Please Enter Password") = Password Then

Application.ScreenUpdating = False

   
    With Sheets("Low Volume").[B8].CurrentRegion
        .AutoFilter
        .AutoFilter Field:=13, Criteria1:="<>"
        With .Resize(.Rows.Count - 1).Offset(1).SpecialCells(xlCellTypeVisible)
            .Copy Sheets("Archive").Cells(Rows.Count, 2).End(xlUp).Offset(1)
            .Resize(, 13).ClearContents
            .Resize(, 1).Offset(, 16).ClearContents
        End With
        .AutoFilter
       
    End With

Application.ScreenUpdating = True

End If
       
End Sub
help234.xls
Kiwi-123Asked:
Who is Participating?
 
rejoinderConnect With a Mentor Commented:
Using Office 2007, I encountered no errors.  The macro ran - I was prompted with a password box.  I typed abc, hit enter then the script copied the cells to the archive page, and then cleared the cells from the Low Volume tab.  No error message or problems detected on my end.
Did you have a screen shot showing any error messages at the point of failure?
0
 
Kiwi-123Author Commented:
Thanks for your help, I will get a screenshot of the error and re-post.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.