Consulting

Results 1 to 4 of 4

Thread: Force enableventes=true

  1. #1
    VBAX Regular
    Joined
    Sep 2007
    Posts
    6
    Location

    Force enableventes=true

    I always turn off/on enableevents in my macros.

    I use on error goto end, where I set enableevents=true

    However, things may go wrong, and enableevents stays in false.

    Is there any way to force enableevents=true when enabling macros?

    Thanks!

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    What things go wrong that keep events off, sounds as if the error handling isn't quite right.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Sep 2007
    Posts
    6
    Location
    I will try to revie my error handling.
    Apart from that, is it possible to force enable events=true?

    Thanks

  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,738
    Location
    I'd do as XLD says and double check your error handling

    When you open the workbook you can put this is standard module to at least enable events for the rest of the startup sequence

    [VBA]
    Option Explicit
    Sub auto_open()
    Application.EnableEvents = True
    End Sub
    [/VBA]

    Paul

Posting Permissions

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