VBA CODING CONVENTIONS

In addition to object naming conventions, LNC proposes several standardized coding conventions for Visual Basic procedures.

Code Comments

There are as many inline Visual Basic code commenting styles as there are Basic coders. Whatever convention you use, the keys are to be terse, yet descriptive and consistent.

LNC suggests placing the following minimum set of comments at the beginning of each procedure:

  • Purpose. Briefly describe the purpose of the procedure.

  • Arguments. List the arguments to a function and how they're to be used.

  • Returns. Describe what the return value of a function signifies.

  • Authors. Name the creator, the date created, the last editor, and the date last edited.

Comments placed on the same line as code should ...

Get F. Scott Barker's Microsoft® Access 2000 Power Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.