I couldn't find an answer anywhere and I have the feeling that it's not possible, but it can't hurt to ask :).
I'm creating an Excel file via a .NET forms app and I added some vba code to the file. I don't want people to mess with it, so I want to put a password on the vba project, but I can't find how to do it. It seems that VBProject.Protection
is read only.
I also tried to unzip the Excel file to see what the difference is in the xl/vbaProject.bin
file after I added a password manually. Although most if it is unreadable, I noticed a line that started with "DPB=" and the value of the password protected project was much longer. However, the unprotected file got corrupted when I copied the value from the protected file.
Does anyone have any experience with automatically protect VBProjects?
I really appreciate any help!