Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference a Label in another Module

Status
Not open for further replies.

Bonediggler1

Technical User
Jul 2, 2008
156
US
Hi--

A quick (and I think easy) question: How to reference a label in another module?

I have the following code in one module, which serves as a point to terminate execution in case of errors:

ExitLine:
Exit Sub

And would like to reference this (i.e. "ExitLine:") from another module.

Thank you!!
 
I do not think it can be done. Even if it could be done, I can not think of a good reason to do it. This sound like some poor coding structure. What are you trying to do? Maybe post some of your code.
 
You can't reference a label not in the scope of the current procedure.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you PVH. I thought that was the case but wanted to check...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top