Solved

Control not coming back

Posted on 2004-08-02
8
248 Views
Last Modified: 2010-05-02
here is a simplified version of my sub

private sub MySub()

   do something
 
   call another sub which in turn calls a variety of simple date conversions,etc.

   do something else  <-- NEVER COMES BACK TO THIS

end sub

BUT!!! the only problem is that it never comes back to 'do something else'
-  when i look at the call stack in the beginning MySub can be seen as the caller....but then at some point it is removed from the stack?!?!

thanks
0
Comment
Question by:tricks801
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 11

Accepted Solution

by:
SweatCoder earned 125 total points
ID: 11696829
have you used step over and step out in debug mode to see where it's branching to and why it's not coming back?
0
 

Author Comment

by:tricks801
ID: 11696929
yes...when it should come back, it doesnt.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 11697098
'yes...when it should come back, it doesnt.'

Does his happen on a particular line of code or is it in an infinite loop?

You will have to step into the called procedures to understand exactly where it goes wrong. You should use breakpoints or Run To Cursor to check when and if it exits from large loops.

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:tricks801
ID: 11698169
do something     // break point here
 
call another sub which in turn calls a variety of simple date conversions,etc.

do something else  <-- NEVER COMES BACK TO THIS // break point here

it is not in an infinite loop as I regain control of the form.
0
 

Assisted Solution

by:Milkus1
Milkus1 earned 125 total points
ID: 11700238
Can we get a little more info ie: the sub it is calling. Is it using any third party controls?
0
 
LVL 76

Assisted Solution

by:GrahamSkan
GrahamSkan earned 125 total points
ID: 11700799
You have repeated your question, but you still do not say how far it gets inside the sub which calls the variety of simple date conversions.

0
 
LVL 7

Assisted Solution

by:Burbble
Burbble earned 125 total points
ID: 11714870
It could be that an error is occuring within the "variety of simple data conversions, etc" Sub, and is being handled by an error handler in MySub() by an Exit Sub command.

But... Without the code I cannot really say for sure.

-Burbble
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question