|
-
April 1st, 2001, 02:53 PM
#1
Goto
Is there a way to do something like this , suppose i am have finished executing a procedure in my module then i want to go to the last line of another procedure in my form. Is this possible?
-
April 1st, 2001, 06:12 PM
#2
Re: Goto
You can only branch to another line in the current Subroutine/Procedure. Using GOTO is not a very good solution in any case. What you should do, it break the procedure (where you want to jump to), into another procedure. Call it from both places you need to like....
public Sub FirstRoutine()
StuffIWantToDoInFirstRoutine
Call CommonRoutine
End Sub
public Sub SecondRoutine()
StuffIWantToDoInFirstRoutine
Call CommonRoutine
End Sub
public Sub CommonRoutine()
StuffIWantToDoInBothRoutines
End Sub
After you call the common routine, flow will continue back with the calling procedure.
Hope this helps
-
April 4th, 2001, 05:21 AM
#3
Re: Goto
Excelent answer. If "eng" do not rate it, I do!
Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|