OVH Cloud OVH Cloud

Sans la selectionner la feuille

2 réponses
Avatar
Didier Novarin
Bonjour
Est-il possible d'avoir cette procédure sans sélectionner la feuille ?
Je vous remercie
Didier

Sub Tri_par_nom()
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:="toto"
Range("A2:P500").Select
Selection.Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
ActiveSheet.Protect Password:="toto"
Application.ScreenUpdating = True
End Sub

2 réponses

Avatar
JLuc
*Bonjour Didier Novarin*,


Bonjour
Est-il possible d'avoir cette procédure sans sélectionner la feuille ?
Je vous remercie
Didier
Bien sur :


Sub Tri_par_nom()
Application.ScreenUpdating = False
With Sheets("Feuil1")
.Unprotect Password:="toto"
.Range("A2:P500").Sort Key1:=.Range("A3"), _
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:úlse, _
Orientation:=xlTopToBottom
.Protect Password:="toto"
End With
Application.ScreenUpdating = True
End Sub

--
____
( O | O )
--
_oooO_ JLuc _Oooo_

O-O

Avatar
Didier Novarin
Bonjour JLuc
Je te remercie beaucoup, c'est parfait !
Bonne journée
Didier

"JLuc" a écrit dans le message de news:

*Bonjour Didier Novarin*,


Bonjour
Est-il possible d'avoir cette procédure sans sélectionner la feuille ?
Je vous remercie
Didier
Bien sur :


Sub Tri_par_nom()
Application.ScreenUpdating = False
With Sheets("Feuil1")
.Unprotect Password:="toto"
.Range("A2:P500").Sort Key1:=.Range("A3"), _
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:úlse, _
Orientation:=xlTopToBottom
.Protect Password:="toto"
End With
Application.ScreenUpdating = True
End Sub

--
____
( O | O )
--
_oooO_ JLuc _Oooo_

O-O