XL 2016 Macro avec mot de passe

jymathieu

XLDnaute Nouveau
Bonjour,
Je voudrais que ma macro suivante protège certaines cellules mais comprenne également le mot de passe, comment faire
ActiveSheet.Protect DrawingObjects:=True,Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingRows:=True, AllowDeletingRows:= _
True, AllowSorting:=True, AllowFiltering:=True,

Où dois-je mettre la formule ActiveSheet.Protect ("12345")?

Merci d'avance
 
Solution
Bonjour,
ici en rouge
ActiveSheet.Protect "12345", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingRows:=True, AllowDeletingRows:= _
True, AllowSorting:=True, AllowFiltering:=True

Seules les cellules verrouillées sont protégées
Merci beaucoup, ça fonctionne

Jacky67

XLDnaute Barbatruc
Bonjour,
Je voudrais que ma macro suivante protège certaines cellules mais comprenne également le mot de passe, comment faire
ActiveSheet.Protect DrawingObjects:=True,Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingRows:=True, AllowDeletingRows:= _
True, AllowSorting:=True, AllowFiltering:=True,

Où dois-je mettre la formule ActiveSheet.Protect ("12345")?

Merci d'avance
Bonjour,
ici en rouge
ActiveSheet.Protect "12345", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingRows:=True, AllowDeletingRows:= _
True, AllowSorting:=True, AllowFiltering:=True

Seules les cellules verrouillées sont protégées
 

jymathieu

XLDnaute Nouveau
Bonjour,
ici en rouge
ActiveSheet.Protect "12345", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowInsertingRows:=True, AllowDeletingRows:= _
True, AllowSorting:=True, AllowFiltering:=True

Seules les cellules verrouillées sont protégées
Merci beaucoup, ça fonctionne
 

Discussions similaires