UNDERSTANDING VARIABLES


A variable is a named storage location in the computer's main memory.

VBA has a few rules regarding variable names:

VBA has reserved words that should not be used for variable names or procedure names:
Variable names should be as descriptive as possible.

To make variable name more readable, mixed cases or underscores are used to make compound-word variable names.

Examples of valid variable names: InterestRate, StudentName, StudentID, Is_Angry, Exam1Score.

Examples of invalid variable names: Interest Rate, InterestRate$, Interest.Rate.