View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Excel 2007: Macros not working in password-protected workbooks

When a password protected workbook is opened in Excel 2007 macros are
automatically disabled, presumably because the macros cannot be scanned due
to the file being encrypted.

Setting this dword registry key to 1 will turn that feature off:

HKCU\Software\Microsoft\Office\12.0\Excel\Security \ExcelBypassEncryptedMacroScan

--
Jim
wrote in message
ups.com...
Hello:

I am creating Excel 2007 workbooks from Access VBA using an Excel
template (.xlsm) containing macros. When I create the workbooks w/o
applying password-protection to the Excel files, the macros run as
they are supposed to. However, when I save the .xlsm workbook with a
password, the macros do not run when I open the workbooks.

When I open the workbook, remove the password, and then close it..the
macros WILL run when I reopen the workbook. They don't run in a
password-protected workbook.

I have the 'Enable All Macros' option set in Trust Settings

Is this a known problem with Excel 2007??

Thanks,

Rick