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
FS
Bonjour,
Par exemple :
'======================= Function IsProtected(Wbk As Workbook) As Boolean Dim x With Wbk x = .ProtectStructure + .ProtectWindows End With IsProtected = (x < 0) End Function '======================= FS -- Frédéric SIGONNEAU Modules et modèles pour Excel : http://frederic.sigonneau.free.fr/
defluc a écrit :
Bonjour à tous
Je voudrais tester à l'intérieur d'une macro si le classeur actif est protégé.
Merci d'avance
Bonjour,
Par exemple :
'======================= Function IsProtected(Wbk As Workbook) As Boolean
Dim x
With Wbk
x = .ProtectStructure + .ProtectWindows
End With
IsProtected = (x < 0)
End Function
'=======================
FS
--
Frédéric SIGONNEAU
Modules et modèles pour Excel :
http://frederic.sigonneau.free.fr/
defluc a écrit :
Bonjour à tous
Je voudrais tester à l'intérieur d'une macro si le classeur actif est
protégé.
'======================= Function IsProtected(Wbk As Workbook) As Boolean Dim x With Wbk x = .ProtectStructure + .ProtectWindows End With IsProtected = (x < 0) End Function '======================= FS -- Frédéric SIGONNEAU Modules et modèles pour Excel : http://frederic.sigonneau.free.fr/
defluc a écrit :
Bonjour à tous
Je voudrais tester à l'intérieur d'une macro si le classeur actif est protégé.
Merci d'avance
defluc
Merci beaucoup FS a écrit :
Bonjour,
Par exemple :
'======================= > Function IsProtected(Wbk As Workbook) As Boolean Dim x With Wbk x = .ProtectStructure + .ProtectWindows End With IsProtected = (x < 0) End Function '======================= > FS
Merci beaucoup
FS a écrit :
Bonjour,
Par exemple :
'======================= > Function IsProtected(Wbk As Workbook) As Boolean
Dim x
With Wbk
x = .ProtectStructure + .ProtectWindows
End With
IsProtected = (x < 0)
End Function
'======================= >
FS
'======================= > Function IsProtected(Wbk As Workbook) As Boolean Dim x With Wbk x = .ProtectStructure + .ProtectWindows End With IsProtected = (x < 0) End Function '======================= > FS