From: Ayo on 28 Apr 2010 13:15 I have this line of code in my macro. Someone with Excel 2003 can go past it. BOReportWS.Sort.SortFields.Clear Is there a way to get it to run in xl2003? 'BOReportWS.Sort.SortFields.Add Key:=Range("A3:A" & BO_DownloadWS_lastRow)
From: Dave Peterson on 28 Apr 2010 14:01 xl2007 still supports the old syntax. So you could create the macro (record it???) in xl2003 and it'll work ok. This may help (or not!): Dim wks As Worksheet Dim myRng As Range Set wks = Worksheets("Sheet9999") With wks Set myRng = .Range("A3:x" & BO_DownloadWS_lastRow) End With With myRng .Cells.Sort _ key1:=.Columns(1), order1:=xlAscending, _ key2:=.Columns(3), order1:=xlAscending, _ header:=xlYes End With This is sorting A3:X(lastrow) by columns A and C. And the data has header in the first row. Ayo wrote: > > I have this line of code in my macro. Someone with Excel 2003 can go past it. > > BOReportWS.Sort.SortFields.Clear > > Is there a way to get it to run in xl2003? > > 'BOReportWS.Sort.SortFields.Add Key:=Range("A3:A" & BO_DownloadWS_lastRow) -- Dave Peterson
|
Pages: 1 Prev: SUMPRODUCT is not working Next: Pointing specific textbox |