Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
LSteph
Bonsoir Magic,
ainsi peut-être:
Sub test() Dim Sh As Worksheet For Each Sh In ActiveWorkbook.Sheets If Sh.CodeName <> "Feuil1" And Sh.CodeName <> "Feuil2" Then With Sh .Activate .Columns("A:P").Sort Key1:=Range("B2"), _ Order1:=xlAscending, Header:=xlYes, _ OrderCustom:=1, MatchCase:úlse, _ Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal .[a1].Activate End With End If Next Sh End Sub
'lSteph
magic-dd a écrit :
bonsoir à tous
j'ai cree cette macro pour trier toutesmes feuilles sauf la 1 et 2 mais cela ne marche que sur la feuille active
merci de m'aider dans la correction de ce code
Sub test()
For Each Sh In ActiveWorkbook.Sheets If Sh.CodeName <> "Feuil1" And Sh.CodeName <> "Feuil2" Then
Sub test()
Dim Sh As Worksheet
For Each Sh In ActiveWorkbook.Sheets
If Sh.CodeName <> "Feuil1" And Sh.CodeName <> "Feuil2" Then
With Sh
.Activate
.Columns("A:P").Sort Key1:=Range("B2"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:úlse, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
.[a1].Activate
End With
End If
Next Sh
End Sub
'lSteph
magic-dd a écrit :
bonsoir à tous
j'ai cree cette macro pour trier toutesmes feuilles sauf la 1 et 2
mais cela ne marche que sur la feuille active
merci de m'aider dans la correction de ce code
Sub test()
For Each Sh In ActiveWorkbook.Sheets
If Sh.CodeName <> "Feuil1" And Sh.CodeName <> "Feuil2" Then
Sub test() Dim Sh As Worksheet For Each Sh In ActiveWorkbook.Sheets If Sh.CodeName <> "Feuil1" And Sh.CodeName <> "Feuil2" Then With Sh .Activate .Columns("A:P").Sort Key1:=Range("B2"), _ Order1:=xlAscending, Header:=xlYes, _ OrderCustom:=1, MatchCase:úlse, _ Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal .[a1].Activate End With End If Next Sh End Sub
'lSteph
magic-dd a écrit :
bonsoir à tous
j'ai cree cette macro pour trier toutesmes feuilles sauf la 1 et 2 mais cela ne marche que sur la feuille active
merci de m'aider dans la correction de ce code
Sub test()
For Each Sh In ActiveWorkbook.Sheets If Sh.CodeName <> "Feuil1" And Sh.CodeName <> "Feuil2" Then