Plage qui se grise
Résolu
JCB40
Messages postés
3058
Date d'inscription
Statut
Membre
Dernière intervention
-
ALS35 Messages postés 1034 Date d'inscription Statut Membre Dernière intervention -
ALS35 Messages postés 1034 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Avec ce code à chaque fois que je rempli une cellule tout la plage se grise et c'est très génant
Avez vous une solution pour améliorer cela
Private Sub Worksheet_Change(ByVal target As Range)
Range("A3:G15").Select
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("A3:A15") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("A3:G15")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("G3:G15") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("A3:G15")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Je vous remercie
Crdlt
Commence par faire le nécessaire ,puis fait ce qu'il est possible de faire et tu réaliseras l'impossible sans t'en apercevoir. Saint François d'Assise
Avec ce code à chaque fois que je rempli une cellule tout la plage se grise et c'est très génant
Avez vous une solution pour améliorer cela
Private Sub Worksheet_Change(ByVal target As Range)
Range("A3:G15").Select
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("A3:A15") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("A3:G15")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Feuil1").Sort.SortFields.Add Key:=Range("G3:G15") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Feuil1").Sort
.SetRange Range("A3:G15")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Je vous remercie
Crdlt
Configuration: Windows / Firefox 71.0
Commence par faire le nécessaire ,puis fait ce qu'il est possible de faire et tu réaliseras l'impossible sans t'en apercevoir. Saint François d'Assise