Solved

Cleaning Up a VB Program

Posted on 2000-02-28
7
149 Views
Last Modified: 2010-05-02
I have taken over a vb project that definitly needs sorting out. For example: the project itself contains loads a dbgrid.ocx, but I am almost certain that this file is no longer used. How do I check this and how do I safely perform some house cleaning. Thank you.
0
Comment
Question by:diek_nf
7 Comments
 
LVL 1

Expert Comment

by:lly
ID: 2565022
You can check if you have remove all the dbgrid.ocx component by going into Project..|Components.. on the menu bar, and de-selecting that component that you do not need.

If you can't remove it, then it means that it is still being used somewhere in your application.


0
 
LVL 3

Expert Comment

by:Lewy
ID: 2565200
There are some utilities to help find dead code and unused variables. I’ve used Project Analyzer (http://www.aivosto.com/vb.html).
I’ve found that it helps to completely rebuild the project. Be sure to use Option Explicit and use cut and past to move the code. It won’t take as long as you think and it will help you get familiar with the code.
0
 
LVL 3

Expert Comment

by:MTroutwine
ID: 2565886
I have used the Project Analyzer mentioned by Lewy and it works very nicely for determining dead code, unused variables and other coding items.  Very nice indeed!
:>)
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:diek_nf
ID: 2565988
Unfortunately my project is too big for the demo version of Project Analyzer to work and I am independent and I cannot afford $90.00 at the present time. I guess I'll have to clean up the project the old fashioned way, with the Illy's suggestion and hard work. Thanks.
0
 
LVL 3

Expert Comment

by:Lewy
ID: 2566018
It may pay to buy it.

If number of hours to clean up * hourly pay - $90.00 is positive then BUY IT.

And you'll have the tool for other jobs.
0
 
LVL 3

Accepted Solution

by:
Lewy earned 100 total points
ID: 2566032
It may pay to buy it.

If number of hours to clean up * hourly pay - $90.00 is positive then BUY IT.

And you'll have the tool for other jobs.
0
 

Author Comment

by:diek_nf
ID: 2566398
Lewy and Everybody who Helped,
Common sense and logic, I love it. You and everyone else who suggested Project Analyzer are correct. Thank you.
Derrick
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question