Kiwi-123
asked on
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].CurrentRegio n
.AutoFilter
.AutoFilter Field:=13, Criteria1:="<>"
With .Resize(.Rows.Count - 1).Offset(1).SpecialCells( xlCellType Visible)
.Copy Sheets("Archive").Cells(Ro ws.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
Please can you help.
Private Sub CommandButton3_Click()
Dim Password
Password = "abc"
If InputBox("Please Enter Password") = Password Then
Application.ScreenUpdating
With Sheets("Low Volume").[B8].CurrentRegio
.AutoFilter
.AutoFilter Field:=13, Criteria1:="<>"
With .Resize(.Rows.Count - 1).Offset(1).SpecialCells(
.Copy Sheets("Archive").Cells(Ro
.Resize(, 13).ClearContents
.Resize(, 1).Offset(, 16).ClearContents
End With
.AutoFilter
End With
Application.ScreenUpdating
End If
End Sub
help234.xls
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER