Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Control not coming back

Posted on 2004-08-02
8
Medium Priority
?
251 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
8 Comments
 
LVL 11

Accepted Solution

by:
SweatCoder earned 500 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 500 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 500 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 500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

885 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