Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all helpful people!
Is there a way to pass the executing procedure name to a variable? I want to keep a log of the most frequently executed procedures in a workbook so each time a proc executes, I build a little table with the Module name, procedure name, user and procedure duration (timed seperately). All ideas treated equally!! Best regards and happy Spring to the North! Bony |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
believe the variable will be lost. one solution is totransfer this data to
hidden cells or sheet "Bony Pony" wrote: Hi all helpful people! Is there a way to pass the executing procedure name to a variable? I want to keep a log of the most frequently executed procedures in a workbook so each time a proc executes, I build a little table with the Module name, procedure name, user and procedure duration (timed seperately). All ideas treated equally!! Best regards and happy Spring to the North! Bony |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Did you try writing a separate procedure say WriteLog() to record the
activity to an external file or a hidden worksheet and call that from end of each proc.. If this post helps click Yes --------------- Jacob Skaria "Bony Pony" wrote: Hi all helpful people! Is there a way to pass the executing procedure name to a variable? I want to keep a log of the most frequently executed procedures in a workbook so each time a proc executes, I build a little table with the Module name, procedure name, user and procedure duration (timed seperately). All ideas treated equally!! Best regards and happy Spring to the North! Bony |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Thanks. Didn't answer the question though. Regards, Bony "daniel" wrote: believe the variable will be lost. one solution is totransfer this data to hidden cells or sheet "Bony Pony" wrote: Hi all helpful people! Is there a way to pass the executing procedure name to a variable? I want to keep a log of the most frequently executed procedures in a workbook so each time a proc executes, I build a little table with the Module name, procedure name, user and procedure duration (timed seperately). All ideas treated equally!! Best regards and happy Spring to the North! Bony |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks,
Didn't answer the question though. Regards, Bony "Jacob Skaria" wrote: Did you try writing a separate procedure say WriteLog() to record the activity to an external file or a hidden worksheet and call that from end of each proc.. If this post helps click Yes --------------- Jacob Skaria "Bony Pony" wrote: Hi all helpful people! Is there a way to pass the executing procedure name to a variable? I want to keep a log of the most frequently executed procedures in a workbook so each time a proc executes, I build a little table with the Module name, procedure name, user and procedure duration (timed seperately). All ideas treated equally!! Best regards and happy Spring to the North! Bony |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
At the top of each procedure store the procedure name then try calling a log
procedure with the name of the procedure Dim myProcedure as string myProcedure = "ThisProcedure" LogProc(myProcedure) -- Regards, Nigel "Bony Pony" wrote in message ... Hi all helpful people! Is there a way to pass the executing procedure name to a variable? I want to keep a log of the most frequently executed procedures in a workbook so each time a proc executes, I build a little table with the Module name, procedure name, user and procedure duration (timed seperately). All ideas treated equally!! Best regards and happy Spring to the North! Bony |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
1. On top of each procedure place a variable to record the starting time.
2. Below each procedure; call the function to write a log Sub Procedure1() dtStart = Now() ' Your code is here strUser = Environ("Username") duration = dateDiff("s",dtStart,Now) Call WriteLog("ModName","Procedure1",strUser,duration) End Sub If this post helps click Yes --------------- Jacob Skaria "Bony Pony" wrote: Thanks, Didn't answer the question though. Regards, Bony "Jacob Skaria" wrote: Did you try writing a separate procedure say WriteLog() to record the activity to an external file or a hidden worksheet and call that from end of each proc.. If this post helps click Yes --------------- Jacob Skaria "Bony Pony" wrote: Hi all helpful people! Is there a way to pass the executing procedure name to a variable? I want to keep a log of the most frequently executed procedures in a workbook so each time a proc executes, I build a little table with the Module name, procedure name, user and procedure duration (timed seperately). All ideas treated equally!! Best regards and happy Spring to the North! Bony |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
Thanks for the help. I read in a Ron de Bruin post that you cannot detect the name of a proc from within that proc. So I already used a method like you all suggested. Many thanks! "Nigel" wrote: At the top of each procedure store the procedure name then try calling a log procedure with the name of the procedure Dim myProcedure as string myProcedure = "ThisProcedure" LogProc(myProcedure) -- Regards, Nigel "Bony Pony" wrote in message ... Hi all helpful people! Is there a way to pass the executing procedure name to a variable? I want to keep a log of the most frequently executed procedures in a workbook so each time a proc executes, I build a little table with the Module name, procedure name, user and procedure duration (timed seperately). All ideas treated equally!! Best regards and happy Spring to the North! Bony |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Name of Module from Procedure? | Excel Programming | |||
How to jump from a Form procedure to a Workbook or Module procedure? | Excel Programming | |||
get module line from erl and procedure | Excel Programming | |||
Add Procedure To Module Via VBA | Excel Programming | |||
Lines in a Module(Procedure) | Excel Programming |