Solved

Control not coming back

Posted on 2004-08-02
8
249 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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 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…
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

617 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