+ Reply to Thread
Results 1 to 2 of 2

Prevent unwanted beforeUpdate event

  1. #1
    Registered User
    Join Date
    07-13-2011
    Location
    Boston, MA USA
    MS-Off Ver
    Excel 2010
    Posts
    28

    Prevent unwanted beforeUpdate event

    Please advise:
    I'm trying to avoid a BeforeUpdate event from being triggered as a result of actions in an InputBox (within the same BeforeUpdate procedure) I use to ask the user to confirm (or deny) the outrageous value just entered. If the user does confirm the value in the InputBox, everything works okay. If the user either hits the Cancel button in the InputBox or does not confirm the input value, the code works but triggers an immediate return to the BeforeUpdate procedure. (It issues the error msg in the beginning of the subroutine that I'm missing an input value.)

    I'm using EnableEvents = False, but it isn't working. The problem is in my "validity check" and my code follows:

    Please Login or Register  to view this content.

    Thanks for any help!
    Last edited by bdoodle; 11-15-2011 at 03:50 PM.

  2. #2
    Registered User
    Join Date
    07-13-2011
    Location
    Boston, MA USA
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Prevent unwanted beforeUpdate event

    I've been able to handle my problem by using my own flag instead of the Application.EnableEvents. Found this solution here:
    http://www.cpearson.com/excel/SuppressChangeInForms.htm

    Apparently, "Application.EnableEvents" does not apply to controls on a Userform.

    Hope this helps others.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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