I have a problem I can not solve this code works fine in excel 2007 but in 2003 they can not adapt it please help me?
Set h1 = ThisWorkbook.ActiveSheet
wpath = ThisWorkbook.Path
u = Range("A" & Rows.Count).End(xlUp).Row
With ActiveWorkbook.Worksheets("Hoja1").Sort
.SortFields.Clear
.SortFields.Add Key:=Range("G2:G" & u), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SetRange Range("A1:P" & u)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Worksheet.Sort
property does not exist in Excel 2003 because the feature was added later.
There is nothing to replace it with. Your code simply does not support Excel 2003.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.