Attribute VB_Name = "ProtegerDeprotegerVBAProject"
'Bill Manville, mpep
'================
Sub TestProtect()
ProtectVBProject Workbooks("Perso.xls"), "zaza"
End Sub
Sub TestUnprotect()
UnprotectVBProject Workbooks("Perso.xls"), "zaza"
'pour qu'Excel reconnaisse la nouvelle situation (déprotection)
DoEvents
With Workbooks("Perso.xls")
'ajout d'un module standard
.VBProject.VBComponents.Add 1
End With
End Sub
link here : http://frederic.sigonneau.free.fr/code/VBE/ProtegerDeprotegerVBAProject.txt


0 comments:
Post a Comment