Programmatically unprotect MS Excel VBA project in Windows 8

2.3k views Asked by At

I'm having some trouble unprotecting a workbook's VBA project via code. The SendKeys method used to work pretty well, but in Windows 8 64-bit it doesn't work anymore. What could be the reason? Does someone know a different method for this environment?

1

There are 1 answers

0
Adrian Gornall On

I had the same issue with Module password. However and i know this sounds a little twisted but the only way i could work out how to unprotect the module was to locally store a copy of the module unprotected, use code to remove the exiting module and export in the unprotected version, then make the changes required using VBA then do vise verse back again. utilizing the export and import function on the module. you'll need to store the protected and unprotected versions locally in separate folders.

Hope this helps!