Coding Conventions

From vb24
Revision as of 10:58, 19 April 2010 by Dec (talk | contribs)
Jump to navigation Jump to search

Separators

  • '##########

Organization

  • called functions after calling functions
  • grouping functions (VBA Access Form: Form, Controls, Methods)

Comments

Function Names

A function name

  • describes what the function does
  • starts with a verb
  • starts lowercase
Sub reportDifference()
    '...
End Sub

Line breaks

Blank lines

  • Dim block
  • if, select, etc

Error Handling

Name parameters

  • Param:="Xyz"

Obsolete constructs

  • Call
  • Set Nothing