Use the New Procedure Builder to quickly create new procedures in your VB6 and Microsoft Office/VBA projects. Simply type in a procedure name, set the options you want, and see your new procedure built piece by piece:
The code automatically applies your commenting, error handling, visual style settings, and naming conventions. Press [OK] to insert the code directly into your project at your cursor, or send it to the clipboard, file, or notepad.
With a few mouse clicks, you take a name, GetCustomerID, and quickly create an entire procedure with your commenting, error handling and other specifications:
Private Function GetCustomerID() As Long ' Comments: ' Params : ' Returns : ' Created : 05/08-LC ' Modified: FMS_PushDebugStack Me.Name & ".GetCustomerID" If gcfHandleErrors_FMS Then On Error GoTo PROC_ERR GetCustomerID = 0 PROC_EXIT: FMS_PopDebugStack Exit Function PROC_ERR: FMS_GLOB_ErrHandler Resume PROC_EXIT End Function
In the example above, you can see:
Your comment and error handler structures are defined under the Standards button and apply to several parts of Total Visual CodeTools. Once defined, Total Visual CodeTools makes it easy to replicate it whenever you create a new procedure. The settings can also be shared across your entire team so multiple developers use a consistent style.
Here are the details of each New Procedure Builder option. See how easy it is to create your new procedures by selecting common options:
Type in your new procedure type, or use the procedure name where your cursor is (helpful if you want to add your comment and error handling structure for an event procedure already created by VB6/VBA).
Specify the scope of the procedure to default (none), Public, Private, or Friend.
Determine whether you want it to be a Sub or Function. If it's a function, you can define the return data type, and optionally assign a return value.
General options that let you determine whether you want to:
Consistent error handling is key to professional VB6/VBA development. Total Visual CodeTools offers three sets of custom error handling routines you can specify. If you define your error handlers for Module, Class, and Form/Reports, you can choose which one you'd like to use for your new procedure.
The Error Handler can insert your procedure name, module name, the procedure type (to use Exit Sub or Exit Function), etc.
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