Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default preventing Application.EnableEvents = False



i want to avoid the preventing excel event to stop.
my workbook have a lot of event procedures.
but, anyone can do stop my event codes using the below code.
Application.EnableEvents = False
He will make the excel application which upper code, and then when the
code run, my workbook events all will stop.
i want to prevent that.

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default preventing Application.EnableEvents = False

In order to execute the expression that disables events is from the visual
basic editor (alt + F11) in the immediate window or using a sub.

You might have to disable Alt + F11 as soon as your workbook is opened
(Auto+Open).

This wil still permit users access to Tools | Macro | Visual Basic Editor.
In order to disable this you would need something like:

Application.CommandBars.ActiveMenuBar.Controls("To ols").enabled = False

BUT: the latter will affect ALL Excel sessions and yourself ... you won't be
able to get to your code. Not nice!

Perhaps you could use an Application.onTime handler to reset events to true
.... but then users can disable this as well.

Interesting question!

"x taol" wrote:



i want to avoid the preventing excel event to stop.
my workbook have a lot of event procedures.
but, anyone can do stop my event codes using the below code.
Application.EnableEvents = False
He will make the excel application which upper code, and then when the
code run, my workbook events all will stop.
i want to prevent that.

*** Sent via Developersdex http://www.developersdex.com ***

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
application.EnableEvents nc Excel Discussion (Misc queries) 1 September 28th 05 04:00 PM
EnableEvents=False doesn't work? or does it? Intellihome[_30_] Excel Programming 0 June 25th 05 05:29 PM
Application.EnableEvents = False not working Paul Martin Excel Programming 3 May 10th 05 05:06 AM
Problems with BeforeSave and Application.EnableEvents = False Sanne Excel Programming 3 February 11th 05 12:26 PM
object.EnableEvents = false Ajit Excel Programming 1 November 3rd 04 09:54 PM


All times are GMT +1. The time now is 10:31 PM.

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

About Us

"It's about Microsoft Excel"