Jump back problem with Sub's

  • Thread starter Thread starter Steffen Loringer
  • Start date Start date
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
 
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
 
Back
Top