|
-
Oct 25th, 2005, 09:46 AM
#1
Thread Starter
Fanatic Member
procedurename in string
is it possible to get the name of a sub or function in runtime.
I would like to use this in errorhandling, so i could log the sub-name or functionname to file.
-
Oct 25th, 2005, 09:49 AM
#2
Re: procedurename in string
 Originally Posted by robbedaya
is it possible to get the name of a sub or function in runtime.
I would like to use this in errorhandling, so i could log the sub-name or functionname to file.
No. Each of your sub/function names will have to be written into your error traps in design.
-
Oct 25th, 2005, 09:57 AM
#3
Re: procedurename in string
well, u can check which module is being called/executed at a given instance of time.
just include a messagebox in all the procedures saying "You are in Module n - Procedure P()" so you will know about the current position of the compiler.
PS - sorry if i misunderstood your question
-
Oct 25th, 2005, 10:07 AM
#4
Re: procedurename in string
robbedaya,
Take a look at *******. It can put that tyoe of error code in all of your modules at once. MZ-Tools can sort of do it one routine at a time.
Last edited by randem; Oct 26th, 2005 at 04:50 AM.
-
Oct 26th, 2005, 01:20 AM
#5
Thread Starter
Fanatic Member
Re: procedurename in string
thanks for your replies. But the answers you are giving is what i want to avoid.
I would like to know the procedure name without typing it myself.
Is there a function that returns the name of the current procedure.
Does anything exist like:
VB Code:
msgbox "an error occured in " & GetCurrentprocedureName
-
Oct 26th, 2005, 02:38 AM
#6
Re: procedurename in string
robbedaya,
I gave you the only way to do it besides typing it yourself. And no you cannot do it that way.
-
Oct 26th, 2005, 04:47 AM
#7
Addicted Member
Re: procedurename in string
is this kinda what your after :
Dim slnfo as string
'display the information
slnfo = "Now Dragging."
slnfo = slnfo + source.Tag
slnfo = slnfo + "Over The Form."
slnfo = slnfo + "State ="
slnfo = slnfo + Str$(State)
txtinfo.Text = slnfo
Forgive me if i did'nt understand!!!! RedAngel
-
Oct 26th, 2005, 06:07 AM
#8
Thread Starter
Fanatic Member
Re: procedurename in string
 Originally Posted by randem
robbedaya,
I gave you the only way to do it besides typing it yourself. And no you cannot do it that way.
oké. thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|