|
-
Dec 14th, 1999, 05:19 PM
#1
Thread Starter
Frenzied Member
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
-
Dec 14th, 1999, 06:50 PM
#2
Member
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.
-
Dec 14th, 1999, 06:58 PM
#3
Thread Starter
Frenzied Member
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
-
Dec 14th, 1999, 07:04 PM
#4
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
-
Dec 14th, 1999, 07:05 PM
#5
Thread Starter
Frenzied Member
Thanks for that serge 
------------------
Mark Sreeves
Analyst Programmer
[email protected]
A BMW Group Company
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|