How can I programmatically remove a (known) password from an Excel VBA project?
To be clear: I want to remove the password from the VBA Project, not the workbook or any worksheets.
Another way to remove VBA project password is;
UPDATE: For Excel 2010 (Works for MS Office Pro Plus 2010 [14.0.6023.1000 64bit]),
If workbook is protected:
xl
workbook.xml
and select Edit<workbookProtection workbookPassword="XXXX" lockStructure="1"/>
(XXXX
is your encrypted password)XXXX
part. (ie. <workbookProtection workbookPassword="" lockStructure="1"/>
)If worksheets are protected:
xl/worksheets/
folder.Sheet1.xml
, sheet2.xml
, etc and select Edit.<sheetProtection password="XXXX" sheet="1" objects="1" scenarios="1" />
<sheetProtection password="" sheet="1" objects="1" scenarios="1" />
)