+ Reply to Thread
Results 1 to 2 of 2

End Program

  1. #1
    Registered User
    Join Date
    02-27-2009
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    7

    End Program

    Hello,
    I have a Program in VBA that I would like to have an If Statement that if it returns a true value the program ends at that point instead of going through the rest of the program, any help would be great, thanks.
    Last edited by styre; 12-04-2009 at 06:55 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: End Program

    You can do
    Please Login or Register  to view this content.
    but it's bad practice.

    If there are exit conditions, you could return a flag that tells the calling routine, or raise an error handled by the calling routine, or ...

    Executing an End statment is like throwing the power switch instead of shutting down gracefully.
    Entia non sunt multiplicanda sine necessitate

+ 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