A
Ayo
I keep getting a "Application-defined or object-defined error" with the code
below.
I am tring to sort by columns B, C, D and I. Row(4) has the Header for the
data range. I am using Excel 2007 but people with Excel2003 need to be able
to use it too hence this sorting code.
What am I doing wrong here? Help!!!!!!!!!!
With ActiveWorkbook.Worksheets("Report 1").Range("B4:AX" & BOReport_lastRow)
.Cells.Sort _
key1:=Columns(2), order1:=xlAscending, _
key2:=Columns(3), order2:=xlAscending, _
key3:=Columns(4), order3:=xlAscending, _
key4:=Columns(9), order4:=xlAscending, _
Header:=xlYes
End With
below.
I am tring to sort by columns B, C, D and I. Row(4) has the Header for the
data range. I am using Excel 2007 but people with Excel2003 need to be able
to use it too hence this sorting code.
What am I doing wrong here? Help!!!!!!!!!!
With ActiveWorkbook.Worksheets("Report 1").Range("B4:AX" & BOReport_lastRow)
.Cells.Sort _
key1:=Columns(2), order1:=xlAscending, _
key2:=Columns(3), order2:=xlAscending, _
key3:=Columns(4), order3:=xlAscending, _
key4:=Columns(9), order4:=xlAscending, _
Header:=xlYes
End With