Catalogueing variables

User avatar
Don Wells
5StarLounger
Posts: 689
Joined: 27 Jan 2010, 16:45
Location: Ottawa, Ontario, Canada

Catalogueing variables

Post by Don Wells »

Hi All
    I am putting together a debugging tool and have a need for snippets that will run in an excel vba macro to list all variables in a project and identify which module.procedure or project object,procedure holds them.
    I'm not asking anyone to develop new code for this; but if you have snippets that might be useful it would be greatly appreciated.

Many thanks in advance.
Stay safe
Regards
Don

User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Catalogueing variables

Post by HansV »

Not what you asked, but perhaps useful: Document Your Excel VBA Procedures.
Best wishes,
Hans

User avatar
ChrisGreaves
PlutoniumLounger
Posts: 15611
Joined: 24 Jan 2010, 23:23
Location: brings.slot.perky

Re: Catalogueing variables

Post by ChrisGreaves »

Don Wells wrote:
06 Jul 2021, 21:03
... will run in an excel vba macro to list all variables in a project and identify which module.procedure or project object,procedure holds them.
Hi Don.
I have an application "PROJE"ext that almost does this. Written in Word2003/VBA but operates on any VBA project (in Word, Excel, Outlook, PowerPoint etc)
It will list all procedures as subroutines or functions, public/private, calls to and calls from etc.
It has a "stripper"module that detects orphaned procedures and displays them for deletion.

It does not do symbolic data names, be they constants or variables, but I thought that (it did it might have been in an earlier version - I am up to PROJE164 right now).

I do recall analyzing CONST and DIM statements at sometime in the past.

(1) How badly do you want symbolic data names?
(2) Do you want to take a look at the PROJE164 code as it is today?

[later] I think I may have the code. I found the attached procedure just now, which (procedure) suggests that I am looking for symbolic data names.
Cheers
Chris
You do not have the required permissions to view the files attached to this post.
There's nothing heavier than an empty water bottle