Solved

Control not coming back

Posted on 2004-08-02
8
244 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 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now