+ Reply to Thread
Results 1 to 2 of 2

exiting the entire macro

  1. #1
    Registered User
    Join Date
    11-28-2012
    Location
    Karnataka, India
    MS-Off Ver
    Excel 2007
    Posts
    48

    exiting the entire macro

    i have macro inside which there is Userform1.show function , in this userform i have designed there is a cancel button, so what code should i write so that wen the click on cancel not just the userform but also the main macro is also deleted.

    Because when i use the EXIT SUB function it just exits from the "btncancel_Click" sub and not the main sub, so is there a way where i can tell it to exit the entire macro?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: exiting the entire macro

    You can use End to halt all code execution.
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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