Before I write one myself....
Does anyone know of an AddIn which searches through [VB5] source code and lists unused or duplicated variables?
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
Printable View
Before I write one myself....
Does anyone know of an AddIn which searches through [VB5] source code and lists unused or duplicated variables?
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
If you use Option Explict at the head of your code you can't have duplictate variables....so that is one way of finding duplicates...when you recompile it will point them out.
You CAN have duplicates!
by which I mean two variables of with the same name in scope at once.
try this:
Code:Option Explicit
Dim x As Integer
Private Sub Form_Load()
x = 1
End Sub
Private Sub Command1_Click()
Dim x As Integer
x = 2
MsgBox x
End Sub
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
I don't know if there's any Add-In for this, but you are right, you can write one yourself.
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
Thanks for that serge :)
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company