Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010
    Posts
    1

    Unanswered: Macro works with a submit button, but doesn't through Worksheet_Change

    I need help.

    The attached excel database works when I press submit to accept the changes.

    I would like it to do the same thing when I enter something into the cell and press enter.

    The code works with the submit button, but the very same code does not work with Worksheet_Change which I cannot understand.

    Can someone help me?

    Thx
    Attached Files Attached Files
    Last edited by jamaicanmlaugh2; 11-07-10 at 23:48.

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Welcome to the forum.

    I cannot open the attachment but I expect that the code within the Worksheet_Change event handler is changing the worksheet and hence causing the event handler to be called recursively. If that is the case you should temporarily disable events within the event handler. Note that you should use error handling to ensure that Application.EnableEvents is set back to True at the end of the process.

    Hope that helps...

Posting Permissions

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