download
order  

Settings

 
OK Cancel Apply Help Developer Error Handling Files and Folders Prefixes Constant Builder Other Procedure Builder Property Builder Method Builder Lines of Code Select Case Developer Initials Organization Copyright

The ability to customize the builders is very important if one wants to support different developers each with their own preferences . 40 different settings logically organized let you make each builder work exactly the way you want it.

Controls:


OK

Save changes to settings and close dialog.

Cancel

Close dialog without saving changes to settings.

Apply

Save changes to settings without closing dialog.

Help

Start this Help topic.

Options

Developer

Developer Initials Organization Copyright

Developer

Name of the developer. Can be used in fragments such as module header by inserting {AUTHOR}

Initials

Initials of the developer. Can be used in fragments such as Comments by inserting {INITIALS}

Organization

Name of the organization for or by whome the software is being developed. Can be used in fragments such as module header by inserting {COMPANYNAME}.

Copyright

Copyright notice. Can be used in fragments such as module header by inserting {COPYRIGHT}.

Error Handling

DefaultErrorHandle ErrorHandleProcedure ErrorHandleModule ErrorHandler ExitHandler Make Procedure Constant True Make Module Constant True

Default Error Handle

The error handler fragment inserted when the user selects

menu: Error > Add Error Handling

You can make your own error handler using Fragment Builder > New (starts Fragment Editor) and Save it to the fragments subfolder 'ErrorHandlers'

ErrorHandle Procedure and Module

Name of the module and procedure for centralized error handling.

ErrorHandler

Default label to jump to for error handling.

ExitHandler

Default label to jump to when the procedure needs to be abandoned.

Make Procedure Constant True

Check this if the centralized error handling wants to pick up the name of the procedure for use in the error message or error log.

Make Module Constant True

Check this if the centralized error handling wants to pick up the name of the module for use in the error message or error log.

Files and Folders

BaseFolder ... LibraryFolder ... LicenseFile ... PrefixStandardsFile ... ModuleHeaderFile ... CollectionClassTemplate ... ProcedureHeaderFile ... ErrorHandleFile ...

Base Folder

Folder in which all subfolders are placed that contain code objects and fragments used by CODE-VB. By default it is placed below the folder which contains the Code-VB add-in.

...

Use these buttons to select alternative folders and file locations. A good use would be sharing locations with other developers on a network

Library Folder

Folder where classes, modules forms and other program objects are stored to share between projects. Use import and export to copy these objects between your project and this shared location.

License File

Location of the license file

Prefix Standards File

File with prefix standards.

Module Header File

Module header fragment.

Collection Class Template

Template from which the collection class is created

Procedure HeaderFile

Procedure header fragment.

Error Handle File

Example centralized error handling procedure. Customize it as you like it.

Prefixes

AutoPrefixVariableName TypePrefix Argument Prefixes Scope Prefixes

Prefixing plays with Constant Builder, Variable Builder, Argument Builder and Fast Declare.

Prefixes work two ways:
1. derive type and level/interface from prefix
1.a if the selected text has a prefix then on start of a builder the type is determined/set automatically (Constant Builder, Variable Builder, Fast Declare). In Var/Const Builder prefix can also be used to distinguish level/interface
1.b if the user types in a Name in a builder if it contains a prefix the type can be determined/set automatically (Constant Builder, Variable Builder, Argument Builder)
2. add prefix automatically for given type Constant Builder, (Variable Builder, Argument Builder and Fast Declare)
2.a Fast Declare: always start with prefixing,
2.b Add prefix for initial default type (e.g. str for String),
2.c Fix prefix after change of type.
 

Auto Prefix Variable Name

Options:

Type Prefixes

Add, change or remove prefixes to be used in this textbox. Each prefix on a separate line. Multiple prefixes separated by comma (',') indicate that whichever string is found it will interpret it as the type specified on the left.

Argument Prefixes

PrefixByRef PrefixByVal

Optional let's you specify to use in a procedure's interface. E.g. rstrName

Prefix ByRef

Normally the prefix 'r' is used

Prefix ByVal

Normally the prefix 'v' is used

Scope Prefixes

PrefixModule PrefixGlobal

let's you specify to prefix for module level and global variable and constants. E.g. gstrApplicationName

Prefix Module

Normally the prefix 'm' is used

Prefix Global

Normally the prefix 'g' is used

Constant Builder

Set Picked Up Name UCASE Const Tag Before Type Tag ConstTag

Set behavior for constant being picked up from selected text. Example if in module selected text is: 'Resource Management' then in the Constant Builder it would be picked up as

csRESOURCEMANAGEMENT (and value 'Resource Management')

Set Picked Up Name Uppercase

In the above example 'Resource Management' changes to RESOURCEMANAGEMENT

Const Tag Before Type Tag and ConstantTag

Specify which character is to be used as prefix, if any.

Other

ModuleNameConstant ProcedureNameConstant Declaration Indented

Module Name Constant

Decide how you want to name the module constant if module constant is inserted (see Procedure Builder)
Private Const cstrModule As String = "ThisWorkbook"

Procedure Name Constant

Decide how you want to name the Procedure constant if module constant is inserted (see Procedure Builder)

Const cstrProcedure = "MyProcedure"

Declaration Indented

If true variables and constants will be inserted one tab from the left,
Sub MySub()
    Dim Var1

else they will be fully at the left.

Sub MySub()
Dim Var1

Procedure Builder

AddErrorHandlingProcedure Add Header Procedure Add Procedure Constant Add Module Constant Procedure Add Hourglass Procedure Arguments on Separate Lines Add Return Statement

Add ErrorHandling

Set default error handling, if any, from the combo box.

Add Header Procedure

Whether to include procedure header text or not.
You have to determine in each case if you want this additional text.

Add Procedure and Module Constant

Generally used for error reporting to indicate where the error occurred.
Private Const cstrModule As String = "ThisWorkbook"

Add Hourglass Procedure

If the process involved with the property is lengthy, it makes sense to add Hourglass.

Arguments on Separate Lines

Determines if all arguments are placed on the same line ...

Sub MySub (Arg1, Arg2, ...)
... or each on a new line
 
Sub MySub (Arg1, _
                Arg2, _
                 ...)

Add Return Statement

In case it is a function there will at least be one statement determining the value to be returned. Check this to get such a statement inserted as default:

Function MyFunction() As String
    MyFunction =
End Function

Property Builder

AddErrorHandlingProperty Add Property Constant Add Module Constant

Add Error Handling

Set default error handling, if any, from the combo box.

Add Property and Module Constant

Generally used for error reporting to indicate where the error occurred.

Private Const cstrModule As String = "ThisWorkbook"

Method Builder

AddErrorHandlingMethod Add Header Add Method Constant Add Module Constant Add Hourglass

Add ErrorHandling

Set default error handling, if any, from the combo box.

Add Header

Whether to include procedure header text or not.
You have to determine in each case if you want this additional text.

Add Method Constant and Module Constant

Generally used for error reporting to indicate where the error occurred.

Private Const cstrModule As String = "ThisWorkbook"

Add Hourglass

If the process involved with the property is lengthy, it makes sense to add Hourglass.

Lines of Code

Include Comment Explicit Arguments Each Argument on a New Line Call Function As Sub Open On Current Project

Include Comment


Explicit Arguments


Each Argument on a New Line

Determines if all arguments in a procedure are placed on the same line ...

MySub Arg1, Arg2, ...
... or each on a new line
 
MySub Arg1, _
                Arg2, _
                 ...

Call Function As Sub

(Applies only to functions) Replaces normal behavior
ret = MyFunction()
by
MyFunction

Open On Current Project




Select Case

Insert Return Values Add Case Else CodeCaseElse

Insert Return Values

Applicable when generating the Select Case from Enum inside a function which returns a string. Example is to generate a string representing the selected (Gradient-)type
Function Gradient2String() As String
Select Case GetGradient
Case msoGradientDiagonalDown
    Gradient2String = "GradientDiagonalDown"
Case msoGradientDiagonalUp
    Gradient2String = "GradientDiagonalUp"
Case msoGradientFromCenter
    Gradient2String = "GradientFromCenter"
...
Case msoGradientVertical
    Gradient2String = "GradientVertical"
End Select
End Function
 

Add Case Else

Adds Case Else to the end of the Select Case statement
...
Case Else
    Msgbox "Missing Case"
End Select

Code Case Else

The code you want to be inserted by default for the Case Else