Determining a function's name at runtime 
Author Message
 Determining a function's name at runtime

How can I determine a function's name at runtime?

E.g.

Sub myFunction()
  On Error Goto ErrHandler
  Dim i as integer
  i = "error!"

  Exit Sub
ErrHandler:
  MsgBox "Error in:" & [?????]
End Sub

I don't know if this is possible but thought I'd ask anyway.

Thanks!
David

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 Determining a function's name at runtime
You can't. The only solution is to hardcode the routine's name in your
code.

- Jim


Quote:

> How can I determine a function's name at runtime?

> E.g.

> Sub myFunction()
>   On Error Goto ErrHandler
>   Dim i as integer
>   i = "error!"

>   Exit Sub
> ErrHandler:
>   MsgBox "Error in:" & [?????]
> End Sub

> I don't know if this is possible but thought I'd ask anyway.

> Thanks!
> David

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

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

2. Function name determine at runtime

3. Determine current procedure name at runtime

4. Determining variable name to compare at runtime

5. Determining user's screen resolution at runtime

6. Determine current function name

7. How to determine function name

8. Need to determine a workstation's Workgroup name

9. Programmatically determining a procedure's name

10. Retrieve name of Function, Sub, Class, Property etc from within that item during runtime

11. Form, module, class and sub or function names at runtime

12. Can a form's name be changed at runtime

 

 
Powered by phpBB® Forum Software