Excel VBA coding standard: do not use Type-Declaration Characters

There are a number of Type-Declaration Characters that exist in VBA as a hangover from BASIC.  These are: % (Integer), & (Long), ! (Single), # (Double), @ (Currency) and $ (String).  They should not be used to declare variables.

Rationale

Consider the following variable declarations.  Which is easier to read and understand?

Dim x As Long

Dim x&

No comments:

Post a Comment