Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default don't allow excel event kill

application.enableevents=false
the code can kill the event routine of all workbooks.

The anyone can kill xl event with that code of one line.
I want to live continually the event in the specific workbook only.
how to method?
excel guru !!,,, answer...help me..


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default don't allow excel event kill

If you suspect that your events have become turned off, you can always go
into the VBA editor and execute this line...

Application.EnableEvents = True

in the Immediate window to restore the event processing. If you are using
this in your code, you should structure things like this...

Sub DoIt(...) ' or Function DoIt(...)
On Error GoTo MakeEverythingRight
Application.EnableEvents = False
'......
'...... <<Your code goes here
'......
Exit Sub ' or Exit Function <<== optional, depends on code
MakeEverythingRight:
Application.EnableEvents = True
End Sub ' or End Function

Rick


"x taol" wrote in message
...
application.enableevents=false
the code can kill the event routine of all workbooks.

The anyone can kill xl event with that code of one line.
I want to live continually the event in the specific workbook only.
how to method?
excel guru !!,,, answer...help me..


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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default don't allow excel event kill

Rick, the way I interpreted the OP was that they want to know how to prevent
someone else from disabling events by using the code line. I was going to
recommend securing the code module with password protection, but that is the
extreme.

"Rick Rothstein (MVP - VB)" wrote:

If you suspect that your events have become turned off, you can always go
into the VBA editor and execute this line...

Application.EnableEvents = True

in the Immediate window to restore the event processing. If you are using
this in your code, you should structure things like this...

Sub DoIt(...) ' or Function DoIt(...)
On Error GoTo MakeEverythingRight
Application.EnableEvents = False
'......
'...... <<Your code goes here
'......
Exit Sub ' or Exit Function <<== optional, depends on code
MakeEverythingRight:
Application.EnableEvents = True
End Sub ' or End Function

Rick


"x taol" wrote in message
...
application.enableevents=false
the code can kill the event routine of all workbooks.

The anyone can kill xl event with that code of one line.
I want to live continually the event in the specific workbook only.
how to method?
excel guru !!,,, answer...help me..


*** 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
Kill Excel Dr. Patrick Havel Excel Programming 1 February 1st 07 01:41 PM
Kill Excel VBS Dave Peterson Excel Programming 2 October 2nd 06 02:16 PM
Kill Excel VBS AA2e72E Excel Programming 1 October 1st 06 09:47 AM
help!kill process excel.exe xz739 Excel Programming 2 August 3rd 06 09:22 AM
Kill Excel Process Mike Moore[_2_] Excel Programming 5 March 17th 05 08:55 AM


All times are GMT +1. The time now is 09:40 AM.

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"