Consulting

Results 1 to 3 of 3

Thread: Solved: Tool to check VBA code

  1. #1
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location

    Solved: Tool to check VBA code

    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:[vba]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 Function[/vba]The 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?
    Matt

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    MZTools
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Knowledge Base Approver
    The King of Overkill! VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    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!
    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •