What you need is MZTools.
Go to MZTools.com, download it and have fun with it. The price is right (Free for VB 6). You can detect unused code very easy, as long as the Subs or Functions are declared Private, I don't think it can find Public Sub and Functions that are not used. Plus, it will tell you if you have variables declared and never used (or in comment out code).
Have fun.
---- Andy