The Standards section of Total Visual CodeTools lets you specify the settings that apply across the Code Builders, Code Cleanup, and Code Delivery features. These settings are saved to a file which can be shared across machines and developers. You can even password protect the settings to enforce your standards across your team.
Available under the Standards menu item or the Standards button on most tools, the settings are organized into these sections:
The Builder Settings specify the general options for the Code Builders.
These options are available:
The Cleanup Style settings are used with the Code Cleanup feature. When you specify the Cleanup Style option under Code Cleanup, the selections here determine how the VB6/VBA code is modified.
These options are available:
For examples of how these settings are applied, see the Sample Code Cleanup.
The commenting section is divided into six tabs:
The General Tab options are:
The other tabs let you specify your comment structure with the use of tokens to reference the module name, procedure lists, procedure name, procedure type, your initials, the current date/time, etc.
Here's an example of the Cleanup Module tab with the list of Token Definitions displayed. When Code Cleanup adds this to a module, the #M# token is replaced with that module's name, #V# is replaced with the list of procedures in the module, #D# with the current date, and #I# with the developer's initials.
For the New Procedure tab, there are separate comment structures for Functions vs. Subs:
Here's more information on the New Procedure Builder.
Similar to commenting, you can specify your own error handler to apply to different situations. The Error Handling section is divided into four tabs.
The first tab is Cleanup Options for Code Cleanup if you choose to add error handling to procedures that lack it. Here you can optionally determine if you want to add error handling to property procedures (Let, Get, and Set), and determine if you want to update any existing error handling that is tagged with Total Visual CodeTools comments (or specify your own tags):
You can specify unique error handling structures for classes, regular modules, and forms/reports. Here's an example of the Modules tab showing the error handling text that goes at the top of the procedure (after comments) and the code at the end of the procedure:
The error handling text can be customized to be much more sophisticated to let you pass information such as the module name #M# and procedure name #P#. The #X# passes Sub or Function depending on the procedure being updated.
Total Visual CodeTools lets you specify naming conventions for variables based on their data type and scope. A powerful option during Code Cleanup is the ability to rename all the variables in your project to your naming convention.
For instance, you may want all your integers to start with "int", strings with "str", etc. The use of a variable naming convention is considered a Best Practice within the VB6/VBA developer community and helps to quickly read a variable name and have an idea of what data it contains. Three tabs are available.
The first tab is for general cleanup settings to determine what variables are updated with your naming convention. You can include or exclude the members of user defined types, variables/constants in ALL CAPS, Types and Enums, and variables shorter than a certain length (for instance one character variables such as X which are commonly used as counters).
You can specify the variable naming convention tag you'd like to use for every data type. We've included a default set of data types and you can add your own:
In addition to data type, you can also rename variables to reflect their scope. For instance, global variables can start with a "g", module level with a "m", procedure parameters with a "p", etc.
Code Delivery just has a few options:
The final section is for managing the settings file. By default, the file is stored in your Application Data folder. This can be moved to a network folder so your whole team can share the same settings. You can also add a password to the file to minimize the ability of others to modify it.
Total Visual CodeTools 2010 stores the settings in a Microsoft Access database file. Older versions use a CTS text file. You can import the settings from a legacy CTS file from here. It will overwrite your current settings.
Supports Office/Access 2016, 2013, 2010, 2007, 2003, 2002, 2000, and Visual Basic 6.0!
Also available for
"Total Visual CodeTools is by far my favorite third-party product."
Alison Balter, Author, Conference Speaker, Instructor
Best Visual Basic Add-In