+ Reply to Thread
Results 1 to 3 of 3

Exiting called macro on error, then ending macro caller.

  1. #1
    Registered User
    Join Date
    04-07-2008
    Location
    Adelaide, SA
    Posts
    87

    Exiting called macro on error, then ending macro caller.

    Hi all,

    I have a userform that when the ADD button is pressed, it calls 4 macros in succession.

    If any of these macros encounter an error, I have each of them set up to display a message that an error has occurred, and then exit the sub.

    The problem is, when an error occurs in the first called macro and it exits, the original macro still calls and executes the next 3 macros.

    What I want to happen is when an error occurs in the first called macro and it exits, to then end the ADD button macro and not call the other 3.

    Hope this makes sense and someone can help.

    Thanks,

    Yappa

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Try using
    Please Login or Register  to view this content.
    instead of
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    04-07-2008
    Location
    Adelaide, SA
    Posts
    87
    Thanks roy, simple yet effective.

    Yappa

+ 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