+ Reply to Thread
Results 1 to 2 of 2

preventing Application.EnableEvents = False

Hybrid View

Guest preventing... 03-29-2006, 04:25 AM
Guest RE: preventing... 03-29-2006, 06:20 AM
  1. #1
    x taol
    Guest

    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. #2
    AA2e72E
    Guest

    RE: 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("Tools").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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1