Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel 2007: Macros not working in password-protected workbooks

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel 2007: Macros not working in password-protected workbooks

On Sep 8, 5:38 pm, wrote:
Hello:

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

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

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

Is this a known problem with Excel 2007??

Thanks,

Rick


Thanks, Jim. I will give this a try.

Can that registry setting be accessed and changed programmatically??

Rick Fooks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - Encrypted and password protected Workbook Ron New Users to Excel 0 August 7th 08 08:21 PM
Links to password protected workbooks Michelle Links and Linking in Excel 9 May 2nd 08 06:33 PM
Macros will not run in a password protected file office 2007 pro Josh C Excel Discussion (Misc queries) 0 November 28th 07 08:13 PM
Excel Macro to open password protected workbooks? DBM[_2_] Excel Discussion (Misc queries) 3 March 30th 07 04:48 PM
Password protected workbooks Mike Stanley Excel Discussion (Misc queries) 1 December 15th 05 11:16 PM


All times are GMT +1. The time now is 08:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"