How to get function/sub procedure name 
Author Message
 How to get function/sub procedure name

    Can I get function/sub procedure name that is running. I want to
send this name to my "general error detector" subroutine for easier
search to find out where error occur.

    Regards,
    Suntisuk Lorkrilert.



Sun, 05 Nov 2000 03:00:00 GMT  
 How to get function/sub procedure name

Hi,

The easiest way would be to "send" it:

    Call MyGeneralDetector(thisProcedureName)

instead of using no argument at all (or not sending the name, to be more
precise). You have to trap the error, anyhow, inside the subroutine you are
in, or relay on the "previously stacked" error trapping (weird thing to do
in most cases). This name is static (unless you cut and paste the subroutine
to get variations), so you may not run into problem typing its constant
value as the argument (which is a bad thing to do in general, I admit it).

Vanderghast, Access MVP.

Quote:

>    Can I get function/sub procedure name that is running. I want to
>send this name to my "general error detector" subroutine for easier
>search to find out where error occur.

>    Regards,
>    Suntisuk Lorkrilert.



Sun, 05 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Returning sub or function name within a specific sub or function

2. Q: printing procedure/function/sub name

3. (Q) Getting current Sub/Function name (or Object Browser functionality)

4. getting the name of current function/SUb

5. Getting function and procedure names using VBA

6. Help - sub procedure and a function procedure

7. Help - sub procedure and a function procedure

8. execute a variable as a function/sub procedure (like eval function in java(script))

9. Automatic capitalization of variable names, type names, subs and functions

10. Retrieve name of current sub/function and name of current module

11. How can I Call a Sub or Function Procedure with a Variable as Function or Procedure Name. Please Help

12. Getting the function's name during runtime while running in the scope of the function

 

 
Powered by phpBB® Forum Software