![]() 2 bytes for a Boolean or Integer variable, 4 bytes for a Long variable, and so on), and that the information being stored in the variable has an allowable range (of True or False for a Boolean variable, a whole number between -32,768 to 32,767 for an Integer variable, a whole number between -2,147,483,648 to 2,147,483,647 for a variable subtype of Long, and so on). When you declare a variable in your code using a Dim statement, you are setting aside sufficient memory for the variable (viz. integer, decimal, text, boolean, etc.) and other information such as its scope/level (what code can access it - variables can be Procedure Level, Module Level or can have a Public scope). By declaring a variable for use in your code, you tell the Visual Basic compiler the variable's data type (type of value it represents viz. In your vba program, a variable stores data and its content is used or changed later while executing the code. ![]() Declaring Variables, Using Dim Statement, Variable Names & Data Types in Excel VBAĪ variable is a named storage location used to store temporary values or information for use in execution of the code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |