If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Stop all code from executing

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-29-09, 13:54
mikezx10 mikezx10 is offline
Registered User
 
Join Date: Oct 2003
Posts: 226
Stop all code from executing

I have a very large amt of code to run, but would like to at anytime completely stop the code.

I dont want to check after each sub or function is the away to do this with a vba keyword or work around?
Reply With Quote
  #2 (permalink)  
Old 05-29-09, 14:05
Ax238 Ax238 is offline
Registered User
 
Join Date: May 2009
Posts: 257
Ctrl-Break is the keystroke you are looking for. If you want it to be in the logic, just put Stop where you want a breakpoint.

Ax
Reply With Quote
  #3 (permalink)  
Old 05-29-09, 15:03
mikezx10 mikezx10 is offline
Registered User
 
Join Date: Oct 2003
Posts: 226
Quote:
Originally Posted by Ax238
Ctrl-Break is the keystroke you are looking for. If you want it to be in the logic, just put Stop where you want a breakpoint.

Ax

stop will stop executing at that line i want to completely end dont exit the function and dont continue from the routine that called the function. Basicly die lol
Reply With Quote
  #4 (permalink)  
Old 05-30-09, 09:01
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
The keyword you are looking for is End.
Code:
End
Note that, unlike the Stop statement, this will cause a state loss event, so any static variables, objects etc.. you have created will be toast.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On