Monday, December 10, 2018

What is VBA - Variables

Variable is a named memory location used to hold a value that can be changed during the script execution. Following are the basic rules for naming a variable.
  • You must use a letter as the first character.
  • You can't use a space, period (.), exclamation mark (!), or the characters @, &, $, # in the name.
  • Name can't exceed 255 characters in length.
  • You cannot use Visual Basic reserved keywords as variable name.
In VBA, you need to declare the variables before using them.
Dim <<variable_name>> As <<variable_type>>

Data Types

There are many VBA data types, which can be divided into two main categories, namely numeric and non-numeric data types.
http://www.tutorialspoint.com/

No comments:

Post a Comment