bonjour Jai transféré un programme d’exel sur libre office et j ai une erreur de macro a le ligne 15
pouvez vous m aider
merci a l avance
Erreur d’exécution BASIC.
'423'
ActiveWorkbook.Worksheets("1049").Sort.SortFields.Add Key:=Range("B16:B4015") _
Option VBASupport 1
Sub Macro1()
'
' Macro1 Macro
'
'
ActiveSheet.Unprotect
Range("Z20").Select
Range(Selection, Selection.End(xlToLeft)).Select
Range("A20:ab20").Select
Range("ab20").Activate
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets("1049").Sort.SortFields.Add Key:=Range("B16:B4015") _
, SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("1049").Sort
.SetRange Range("A20:ab4020")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("H16").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Range("D4010").Select
Selection.End(xlUp).Select
ActiveWindow.SmallScroll Down:=-27
ActiveSheet.Protect
Range("H5:J5").Select
thiscomponent.currentSelection.CharColor = -16776961
End Sub