bonjour dans le code suivant
je voudrais que cette macros s'applique de la feuille 1 a la feuille 31 qui corresponde aux nombres de jours mensuel
(pas uniquement a la feuille 01)
je ne sais pas comment reprendre ce code et modifié worksheet ,sheet ???
merci pour votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 Sub maj_rdv() ' ' maj_rdv Macro ' ' ActiveSheet.Unprotect Range("A14:N100").Select ActiveWorkbook.Worksheets("01").Sort.SortFields.Clear ActiveWorkbook.Worksheets("01").Sort.SortFields.Add Key:=Range("A14"), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("01").Sort .SetRange Range("A14:N100") .Header = xlNo .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Selection.Rows.AutoFit ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub
Partager