AfterUpdate Event

Discussion in 'AutoCAD' started by Randy Richardson, Apr 23, 2004.

  1. If I want the program to take a certain action before after updating a
    particular
    control, say control "Xyz", I create a sub Xyz_AfterUpdate.

    Is there any way for the AfterUpdate Event to supply to the program the
    reason that
    the control is being exited? For example, if the user were to press the
    "Cancel" button on the dialog box, while in control "Xyz" it would not be
    desirable to run function Xyz_AfterUpdate, but if the user leaves the
    control for
    any other reason than it would be. If there were a way for the program to
    see the intended destination before running, that would be great.

    Thank you,

    Randy
     
    Randy Richardson, Apr 23, 2004
    #1
  2. Randy Richardson

    wivory Guest

    I saw your other thread on Exit too. I assume you're doing this with a VBA form inside AutoCAD - I don't have much experience with those type of forms. But I can tell you that in Visual Basic (standalone) they introduced the Validate event for precisely this type of reason - to *not* run certain code if the user is just trying to Cancel or Close the form. Depending how critical this functionality is you may have to consider porting it from VBA to VB.

    Regards

    Wayne Ivory
    IT Analyst Programmer
    Wespine Industries Pty Ltd
     
    wivory, Apr 27, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.