There's no way to know what Sub or Function (or Module) you are in except by hard coding the names yourself.
It might be possible in some circumstances to know what UserForm (by using Me.Name) you are in.
Enjoy,
Tony
-------------------------------------------------------------------------------------------- We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.