Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lost Cancel Button (2000)

    Weirdest thing! I had a UserForm working as it should, made a few small changes to the VBA code, and now appear to have lost the functionality of the Cancel button. I have its Cancel property set to True, and the form will still "cancel" or close with the X button top right of form. It doesn't seem to matter what I do - that Cancel button won't cancel no more.

    The fix is easy enough - just use "End" in the button's click event; but this isn't the point! [img]/forums/images/smilies/wink.gif[/img]
    What's happened here?

    Alan

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Lost Cancel Button (2000)

    Note that using End in the click event resets all of your code and empties all global variables!

    As to the problem. No idea. sometimes saving, closing and reloading helps.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Lost Cancel Button (2000)

    Thanks Jan.
    And thanks for this warning - such possible consequences never occurred to me.
    Sorry to reply so late too - for some reason I failed to mark my post as "watched", so lost track of it.

    cheers

    Alan

Posting Permissions

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