View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default List variables in worksheet

Thanks, but got that one already.

RBS

"Bob Kilmer" wrote in message
...
Take a look at http://www.mztools.com/ This is not the answer to all of
your prayers, but it has some handy utilities. The Find functionality

shows
you where every instance of a search target is within the scope

(procedure,
module, project) that you sepcify. Handy for quickly learning where
variables are used in a project. Double-click to go there. Also includes
some analysis tools.

--
Bob Kilmer


"Bob Kilmer" wrote in message
...
I just wrote a VB6 addin in a day or so that will (among other things)

list
all procedures by module and project in a project group using objects

and
techniques similar to the ones explained he
http://www.cpearson.com/excel/vbe.htm . You could do the same for Excel.

The
code need not be in an addin, but could be in a regular project.

If you don't want to write your own utility, you might copy a modules

worth
of code at a time into a text editor that can sort the lines then sort

the
lines. Those that begin with Public, Private, Dim, Const, Type, Enum,

Sub,
Function will be variables, constants or procedures. If you are

concerned
with their order in the original module, number the lines (include

leading
zeros), sort by the column following the numbers, delete lines you don't
want (or copy out those you do), then resort by the first column. You

may
discover other tricks. UltraEdit is an editor that will let you do the
foregoing. You can download a free, fully functional, time limited copy

at
www.ultraedit.com or download a registered copy for - last I looked -

$35.
UltraEdit will list functions in a file it thinks is a VB file
(*.bas,*.cls,*.frm,*.ctl) in a list that can be copied. It might not
identify all procedures and may identify some variables that are not
procedures out of the box, but I was able easily modify the

"WORDFILE.TXT"
that it uses to ID them so that it will.

If you don't need local variables, then the variables you do want will

be
at
the top of the modules.

--
Bob Kilmer


"RB Smissaert" wrote in message
...
Using Excel XP.
How would I get a list of all the variables, their type (public,

private,
including arrays, no need for local variables), the module and the

subs
or
functions they are used in in a worksheet?
Had a look at different freeware utilities, but found nil yet that can

do
this.
The purpose is to make it easier to split up one large module into

smaller
ones.
Thanks for any advice.

RBS