Re : Exécuter plusieurs macros à l'ouverture
Voici le code de deux de mes macros :
Sub suivi15jours()
'
' suivi15jours Macro
'
'
ActiveSheet.Range("$A$3:$F$619").AutoFilter Field:=6, Criteria1:= _
"En attente"
ActiveWorkbook.Worksheets("Suivi 15 jours").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Suivi 15 jours").AutoFilter.Sort.SortFields.Add Key _
:=Range("E3:E619"), SortOn:=xlSortOnValues, Order:=xlDescending, _
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Suivi 15 jours").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
AND
Sub suiviappels()
'
' suiviappels Macro
'
'
ActiveSheet.Range("$A$3:$F$1260").AutoFilter Field:=5, Criteria1:="<11", _
Operator:=xlAnd
End Sub
Et voici maintenant le combiné des deux :
Sub TOUSSUIVIS()
'
' TOUSSUIVIS Macro
'
'
ActiveSheet.Range("$A$3:$F$619").AutoFilter Field:=6, Criteria1:= _
"En attente"
ActiveWorkbook.Worksheets("Suivi 15 jours").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Suivi 15 jours").AutoFilter.Sort.SortFields.Add Key _
:=Range("E3:E619"), SortOn:=xlSortOnValues, Order:=xlDescending, _
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Suivi 15 jours").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Sheets("Suivi des appels").Select
ActiveSheet.Range("$A$3:$F$1260").AutoFilter Field:=5, Criteria1:="<11", _
Operator:=xlAnd
End Sub
En espérant que cela vous aidera à m'aider