Jump back problem with Sub's

S

Steffen Loringer

Hi guys,

I found something really suprising me in my ASP.NET page.
My code consists of three Sub's - Public Sub A (); Private Sub B (ByRef
x As Integer) and Public Sub C ().

I'm calling Sub B in Sub A and also in Sub C! But if I call it from C
the execution returns to the call in A instead of C once B is completed!

Anybody any idea??

Thanks a lot
Steffen
 
J

Jared

Steffen,
First, you are using a Sub so the phrase "the execution returns" is not
exactly accurate; you aren't returning anything. Secondly, you are passing
a value ByRef, so the error could be in your logic. Convert B to a function
that actually returns a value. See if the problem still exists.
Jared
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top