We ship excel workbook with user access control. But, noticed that they can get into the workbook with hex editor approach (via >Is there a way to crack the password on an Excel VBA Project?) and altering our code to authenticate that user. To prevent that, we attempted to store DBP = [TEXT] in database and verify against it every time a Macro is launched. It failed as DBP text changes every time the Macro is saved.
Idea is that we try to unlock VBA Project by passing the password that we set and receive a message if the password is correct or not. Now, the question is, is there a way to automate a process? I found ways to unlock the VBA project via another workbook, but they get stuck if the password is incorrect while automating the process.
The process of verifying can be done server side. So, it would be better if it can be done via C# Office interop rather than VBA. Much better would be OpenXML. VBA solutions are welcomed as well.