Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing macro security causes VBA code to fail

Hoping someone has an answer to this one. Using 2003, I've created
some VBA macros which work fine when the security level is set to
"enable all macros". However, when the security is changed to "disable
with notification" in 2007, it sometimes fail.

The scary part is that it is inconsistent. If I set a break point, and
step through it, it works fun. When I take out the break point, it
will crash.

The last set of errors comes from Excel not understanding the
currentregion property of the active cell. Once this code has been
changed, all of a sudden, the pivot table code fails.

What's really frustrating is that even if I make a minor tweak, and
successfully run through the VBA code, I can close it, shut down
Excel, then re-open the file in Excel, and it will fail again!!

But, this only seems to happen when the security setting is "disable
with notification".
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Changing macro security causes VBA code to fail

You need to consider your personal situation but I find the Trusted Locations
saves me a lot of hassel with my own developed applications. Look up Trusted
Locations in help.

--
Regards,

OssieMac


" wrote:

Hoping someone has an answer to this one. Using 2003, I've created
some VBA macros which work fine when the security level is set to
"enable all macros". However, when the security is changed to "disable
with notification" in 2007, it sometimes fail.

The scary part is that it is inconsistent. If I set a break point, and
step through it, it works fun. When I take out the break point, it
will crash.

The last set of errors comes from Excel not understanding the
currentregion property of the active cell. Once this code has been
changed, all of a sudden, the pivot table code fails.

What's really frustrating is that even if I make a minor tweak, and
successfully run through the VBA code, I can close it, shut down
Excel, then re-open the file in Excel, and it will fail again!!

But, this only seems to happen when the security setting is "disable
with notification".

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Changing macro security causes VBA code to fail

On Oct 24, 9:03*pm, OssieMac
wrote:
You need to consider your personal situation but I find the Trusted Locations
saves me a lot of hassel with my own developed applications. Look up Trusted
Locations in help.

--
Regards,

OssieMac



" wrote:
Hoping someone has an answer to this one. Using 2003, I've created
some VBA macros which work fine when the security level is set to
"enable all macros". However, when the security is changed to "disable
with notification" in 2007, it sometimes fail.


The scary part is that it is inconsistent. If I set a break point, and
step through it, it works fun. When I take out the break point, it
will crash.


The last set of errors comes from Excel not understanding the
currentregion property of the active cell. Once this code has been
changed, all of a sudden, the pivot table code fails.


What's really frustrating is that even if I make a minor tweak, and
successfully run through the VBA code, I can close it, shut down
Excel, then re-open the file in Excel, and it will fail again!!


But, this only seems to happen when the security setting is "disable
with notification".- Hide quoted text -


- Show quoted text -


Thanks OssieMac. We actually have a certificate for the file too.
Trusted locations are an issue, as we have 1000's of users of this
Excel form. Thanks for the feedback though.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Changing macro security causes VBA code to fail

Sorry but I can't offer any other suggestions
--
Regards,

OssieMac



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Changing macro security causes VBA code to fail

I ran into a problem with code that behaved just like yours. It worked fine
if I stepped throught it in vba, but when it ran, it crashed. To solve, I
turned screen updating on prior to the code that was crashing.
application.screenupdating = true

It may be that Excel 2007 pivot tables require the screen to update to work.

Robert Flanagan
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

wrote in message
...
Hoping someone has an answer to this one. Using 2003, I've created
some VBA macros which work fine when the security level is set to
"enable all macros". However, when the security is changed to "disable
with notification" in 2007, it sometimes fail.

The scary part is that it is inconsistent. If I set a break point, and
step through it, it works fun. When I take out the break point, it
will crash.

The last set of errors comes from Excel not understanding the
currentregion property of the active cell. Once this code has been
changed, all of a sudden, the pivot table code fails.

What's really frustrating is that even if I make a minor tweak, and
successfully run through the VBA code, I can close it, shut down
Excel, then re-open the file in Excel, and it will fail again!!

But, this only seems to happen when the security setting is "disable
with notification".



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
Changing Macro Security in Excell 2007 Jay Miyaki Excel Discussion (Misc queries) 3 June 5th 08 04:43 PM
Code for macro security level KP[_3_] Excel Programming 2 January 17th 08 03:12 AM
Placement of variables in called sub causes code to fail acampbell Excel Programming 4 March 23rd 07 04:52 PM
Changing Macro Security settings does not work Rick Hammett Excel Programming 1 August 10th 05 09:54 PM
Changing Macro Security Kirk Excel Programming 5 March 3rd 05 03:28 AM


All times are GMT +1. The time now is 02:23 AM.

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"