- Procedure (used within a procedure)
- Module (used within a module and can be used with multiple procedures)
- Project ( used within a project and can be used with multiple modules)
For most vba you will need to declare variables. The "Dim" statement is used to setup your variables as different data types in conjunction with a variable name.
For example: Dim MyName as String
The example above uses the "Dim" statement, the variable name "MyName" and the data type of "String".
You can declare multiple variables of the same data type together.
For example: Dim MyName, MyAddress, MyCity, MyState, MyZip as String
You can also declare multiple variables of different data types together.
For example: Dim MyName as String, MySalary as Long, MyAge as Integer
Special Thanks to:
No comments:
Post a Comment
Thanks for leaving a comment.