How-to: The Reddick VBA Naming Conventions - Suffixes

Suffixes modify the base name of an object, indicating additional information about a variable. You’ll likely create your own suffixes that are specific to your development work. Table 4 lists some generic VBA suffixes.

Table 4. Commonly used suffixes.

Suffix Object Type
Min The absolute first element in an array or other kind of list.
First The first element to be used in an array or list during the current operation.
Last The last element to be used in an array or list during the current operation.
Lim The upper limit of elements to be used in an array or list. Lim isn’t a valid index. Generally, Lim equals Last + 1.
Max The absolutely last element in an array or other kind of list.
Cnt Used with database elements to indicate that the item is a Counter. Counter fields are incremented by the system and are numbers of either type Long or type ReplicationId.

Here are some examples:

iastrNamesMin

iastrNamesMax

iaintFontSizesFirst

igphsGlyphCollectionLast

lngCustomerIdCnt

varOrderIdCnt

Copyright © 1995 Greg Reddick. You can freely distribute this document.

Related

  1. Introduction - Variable and Procedure names
  2. Prefixes
  3. Suffixes
  4. Object variables and DAO - variables
  5. Database Explorer objects - Table, Query, Form etc
  6. Object Names

 
Copyright © 1999-2024 SS64.com
Some rights reserved