UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Exit Sub - Stop - Just Stop Now, Office 2010    
 
   
bakersburg9
post May 15 2018, 10:01 PM
Post#1



Posts: 5,231
Joined: 2-November 04
From: Downey, CA


I've searched far and wide for help with this problem, and everything is so complicated - my situation is simple - I have a macro that calls numerous subs and functions - very convoluted - this deals with our companies' North, Central and South region - it extracts data from another worksheet, and puts it in one centralized location... there is a key difference with only the Central region, and it's causing a problem - I troubleshot it, and, stepping through the routine, found exactly where things go bad for the Central region - if it just STOPPED right there, it would be all perfect - so I wrote a sub routine with a CASE statement, which basically said if north or south, do nothing (keep going), if Central
CODE
Exit Sub
- but it kept going - is there like a "Kill" statement, or something to get it to just stop or exit THIS routine ?

Hope that's not too vague...
Go to the top of the page
 
WildBird
post May 15 2018, 10:48 PM
Post#2


UtterAccess VIP
Posts: 3,420
Joined: 19-August 03
From: Auckland, Little Australia


Show more of the code, and are you sure it actually gets to this? Have a message box above it to see if that works for example. Could be that you think it fires, but it overshoots it.
Go to the top of the page
 
DanielPineault
post May 16 2018, 05:01 AM
Post#3


UtterAccess VIP
Posts: 6,133
Joined: 30-June 11



My first guess would be that either your Case statement isn't working or you are exiting a sub routine but the main one continues. We'd need to see the entire picture.
Go to the top of the page
 
dflak
post May 16 2018, 10:12 AM
Post#4


Utter Access VIP
Posts: 6,230
Joined: 22-June 04
From: North Carolina


Put a breakpoint in your code, run it and then step through it using F8 to see what path it takes through the logic.
Go to the top of the page
 
bakersburg9
post May 16 2018, 11:10 AM
Post#5



Posts: 5,231
Joined: 2-November 04
From: Downey, CA


you're right about the case - it was fixed by changing yes to vbyes - thanks ! cool.gif
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    22nd October 2018 - 11:18 AM