Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

Excel Documentor to show me how the code is being executed

I have looked at several code document  vba add-ins program.
Code Documentor
Visustin v7.
What i need:

Looking for an add-in that will simply document my calls and procedures while using my add-in program.
i.e.
When the workbook opens , what procedures were called.
My useform opens:
I press buttons to call other procedures
etc...
Basically show me all the things i did while using the add-in

Thanks
fordraiders
0
Fordraiders
Asked:
Fordraiders
  • 13
  • 10
1 Solution
 
Martin LissRetired ProgrammerCommented:
Debug will do some of that in that you can set a breakpoint and then look in the call stack to see the last several procedures that were executed. Fot more information on debugging see this article I wrote on the subject.

I also happen to be developing an add-in for VBA that will allow you to produce a list of any or all the procures that get executed while you are using the workbook. If you download the attached InsertProcNameVBA.txt file, store it anywhere you like, rename it as InsertProcNameVBA.dll and then go to Start|Run and type in "Regsvr32  C:<your path>\insertprocnamevba.dll" (in some versions of Windows you need to drag the dll file to the Regsvr32 program).

Then Open Excel, go to Visual Basic (Alt+f11), go to Add-ins|Add-in Manager and select "Insert Procedure Names VBA" from the list. Two new buttons will then appear. The first one will allow you to select the procedures you want to trace and the second allows you to set what you want to have happen. The default is a Debug.Print statement containing the name of the procedure.
InsertProcNameVBA.txt
0
 
FordraidersAuthor Commented:
i cant detatch this file ?
0
 
Martin LissRetired ProgrammerCommented:
What do you mean?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
FordraidersAuthor Commented:
I cant save it..
0
 
FordraidersAuthor Commented:
i cant download it.
everytime i click on it it open in IE
0
 
Martin LissRetired ProgrammerCommented:
I'm not sure what is going on but what happens for most people is that after they click on the attachment in ID: 40288421, the file is stored by their browser in whatever folder you have chosen to have your downloads sent to. You should then be able to go to that folder and the follow the instructions I gave.

What exactly did you do, step by step, that causes you to say "I cant save it"?

I have to go out for a few hours but I'll check back with you when I return.
0
 
FordraidersAuthor Commented:
0
 
Martin LissRetired ProgrammerCommented:
i cant download it.
everytime i click on it it open in IE
Oh, I see. In IE I think you need to just right-click on the page an then "Save As".
0
 
FordraidersAuthor Commented:
it wont give me that option..but i did find the file...
http://www.vbforums.com/showthread.php?774601-Overlap-between-to-add-ins&p=4747545   
here.
Is this ok ?
0
 
FordraidersAuthor Commented:
hmmm...ok  loaded.
The buttons appear.
I highlight the procedure.
Click the procedure button
But nothing seems to happen when i execute he code
sorry, Feel like an idiot but....
0
 
Martin LissRetired ProgrammerCommented:
As I said, I'm developing this add-in as we speak so I've attached an updated file.

The statements will only appear if the code gets to them.

add-in
You need to select the button at #1, then select the procedures you want to trace in #2. When you click 'Add" the statements that you see at #3 will appear, and then if the procedures that you chose are executed, the Debug.Print statements will appear in the Immediate Window that you get to from Visual Basic by typing ctrl+g.


In order for anything to happen you must select the procedures you want to trace
InsertProcNameVBA.txt
0
 
FordraidersAuthor Commented:
Martin, sounds good. Can u please post the file in zip format. I have no shorcut selection for "save target as"..
weird. Just started happening. in EE
0
 
Martin LissRetired ProgrammerCommented:
EE won't all the dll, but you can download it from MediaFire.
0
 
FordraidersAuthor Commented:
perfect !
on Button1

and a brief explanation on

Select "A" set code to be added to procedure ??

and please keep me posted on updates..Is there a way for that !!!
This is great ! saved me 4 hours of work in 2 min


Thanks
fordraiders
0
 
FordraidersAuthor Commented:
Martinliss, You should charge for this man.
This is exactly what no other program offers. !   Great  Work !
fordraiders
0
 
Martin LissRetired ProgrammerCommented:
The "A" button is the one shown in this picture
"A" button
and when you select it if you leave it at the default (Debug.Print) you'll produce Debug.Print statements like you've probably already seen. If you select the second option you'll produce statements like these
Const
Where you could use PROC_NAME for example as a value to pass to some common error handler so you know where the error occurred. The 3rd option is open to your imagination.

I most likely won't remember to update you but if you check my profile once in while you'll find a link to an article I wrote concerning a similar add-in for VB6. When I'm finished with the VBA version I'll update that article.
0
 
Martin LissRetired ProgrammerCommented:
I'll settle for the points:)
0
 
FordraidersAuthor Commented:
np settled and thanks for the information.
0
 
Martin LissRetired ProgrammerCommented:
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
0
 
Martin LissRetired ProgrammerCommented:
I remembered!

Save your old dll or txt file but I've republished my article.
0
 
FordraidersAuthor Commented:
Thanks very very much...Its working great !
0
 
FordraidersAuthor Commented:
martinless,
Did u update mediafie with the new dll.

I just can download the .txt file for some reason.

Thanks
fordraiders
0
 
FordraidersAuthor Commented:
martinless, Its something in firefox apparently.  Saved it from IE.

Thanks'
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 13
  • 10
Tackle projects and never again get stuck behind a technical roadblock.
Join Now