PDA

View Full Version : Solved: Tool to check VBA code



mvidas
07-24-2007, 10:35 AM
Hi Everyone,

I remember someone telling me once (I think it might have been Ken) about an addin or tool of some sort that would check a vbaproject for any unused (but declared) variables, unused procedures, etc. For example, if I had the code:Sub MainSub()
Dim i As Long, j As Long, k As Long
i = 3
j = DoubleAVariable(i)
End Sub
Function DoubleAVariable(x As Long) As Long
DoubleAVariable = 2 * x
End Function
Function TripleAVariable(x As Long) As Long
TripleAVariable = 3 * x
End FunctionThe tool would point out that I never use the variable "k", and I never use the function "TripleAVariable". Anyone know what tool this is, or am I just imagining things again?

Bob Phillips
07-24-2007, 11:06 AM
MZTools

mvidas
07-24-2007, 11:13 AM
Thats it! Now I remember why I couldn't use it dll--its an installable exe rather than a dll to manually register (and me at work without being an admin on this PC so no installs). I'll do it at home tonight though

Thanks!