Unprotect a Excel workbook using vba macro
'If document is protected, Unprotect it.
If ActiveDocument.ProtectionType < wdNoProtection Then
ActiveDocument.Unprotect Password:=""
End If
'ReProtect the document.
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
NoReset:=True
End If
One unprotects then one protects
"VJ" wrote:
Is there any way, I can unprotect a excel workbook using vba macro.
Thanx
|