Bonjour le forum,
J'ai un soucis avec une procedure écrite sous XL2007 et retranscrit en XL2003
il me dit que la variable n'est pas défini et me surligne
"SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal"
pour info,
cette prcocèdure contenanait 4 tri sous 2007 et je l'ai séparéré en 2 fonctions pour le passage en 2003.
Merci d'avance
ExcelCed
J'ai un soucis avec une procedure écrite sous XL2007 et retranscrit en XL2003
il me dit que la variable n'est pas défini et me surligne
"SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal"
Code:
Sub Tri_Multicritere()
'
' Tri_Multicritere Macro
'
'
ActiveWorkbook.Worksheets("Tri").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Tri").Sort.SortFields.Add Key:=Range("B2:B2000"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Tri").Sort.SortFields.Add Key:=Range("D2:D2000"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Tri").Sort
.SetRange Range("A1:AI2000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
pour info,
cette prcocèdure contenanait 4 tri sous 2007 et je l'ai séparéré en 2 fonctions pour le passage en 2003.
Merci d'avance
ExcelCed