I know I can use FUNCNAME$ and a myriad of other things like callstack. But is there a way for my code to know that the code that is currently running is in a Sub? Function? Method? Property?
Any PB or API way to do it? or will I need to set some sort of flag to indicate what it is running in?
Sort of like
Probably I will have to use a flag, but thought I would ask
Any PB or API way to do it? or will I need to set some sort of flag to indicate what it is running in?
Sort of like
Code:
Function MyFunction() As Long Local CodeType As Whatever CodeType = DetermineCodeType(FUNCNAME$) '<--- Returns value indicating if Sub/Function/Method/Property End Function
Comment