Solved

Cleaning Up a VB Program

Posted on 2000-02-28
7
152 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 61
Macro: print each sheet to pdf using ExportAsFixedFormat 11 64
How to set the sa password in a vb6 code for sql connection 9 62
Passing a Text Box name to a Sub 6 102
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

733 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