VBA Big Brother Style Procedure
Hello!
Is it possible to make a procedure that shows a msgbox every time any Sub is executed in the active workbook? Any advice much appreciated! Thanks in advance, Albert C. |
VBA Big Brother Style Procedure
Yes. Add a message box to the beginning of each subroutine manually. It is not that hard. -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=147005 |
VBA Big Brother Style Procedure
The only way I know if it a brute force method. PUt a message box in every
sub. I know of no other more elegant way than that. HTH, Barb Reinhardt "Albert" wrote: Hello! Is it possible to make a procedure that shows a msgbox every time any Sub is executed in the active workbook? Any advice much appreciated! Thanks in advance, Albert C. |
VBA Big Brother Style Procedure
And if it's always the same message (or similar), you can create a new
subroutine and just call it from each of your procedures: Sub DoTheMessage(optional myStr as string = "") MsgBox "Here's a message " & myStr end sub Then you'll still have to change your existing procedures: Sub Mac1() call dothemessage("hi there") end sub or Sub Mac2() call dothemessage end sub Albert wrote: Hello! Is it possible to make a procedure that shows a msgbox every time any Sub is executed in the active workbook? Any advice much appreciated! Thanks in advance, Albert C. -- Dave Peterson |
VBA Big Brother Style Procedure
Hmmm... Yeah, I was sort of looking for the more Elegant solution, as Barb
accurately calls it. Thanks anyway... "Dave Peterson" wrote: And if it's always the same message (or similar), you can create a new subroutine and just call it from each of your procedures: Sub DoTheMessage(optional myStr as string = "") MsgBox "Here's a message " & myStr end sub Then you'll still have to change your existing procedures: Sub Mac1() call dothemessage("hi there") end sub or Sub Mac2() call dothemessage end sub Albert wrote: Hello! Is it possible to make a procedure that shows a msgbox every time any Sub is executed in the active workbook? Any advice much appreciated! Thanks in advance, Albert C. -- Dave Peterson . |
VBA Big Brother Style Procedure
You know I never see anybody use any conditional compiling statements like below #Const DebugX = False Sub test() #If DebugX = True Then MsgBox ("Test") #End If a = 1 End Sub -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=147005 |
VBA Big Brother Style Procedure
Perhaps if we knew why, you might get some more elegant answers. ?;^)
Nick H |
VBA Big Brother Style Procedure
Hi Nick!
I have a few users accessing my Macro enabled workbook on a daily basis. However, i want to get an email every time they run one of the procedures. I already have the "email sender" procedure set up and working correctly I want the Big Brother to email me with the Procedure Name every time the users use any of the procedures. Thanks in advance, Albert C "Nick H" wrote: Perhaps if we knew why, you might get some more elegant answers. ?;^) Nick H . |
All times are GMT +1. The time now is 10:58 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com