monirg
Well-known Member
- Joined
- Jan 11, 2005
- Messages
- 629
Please advise:
1. If a variable is declared above all procedures in one module, then it is available to all procedures in that module. (correct ?)
2. If a variable at one module level is declared as Public, then it is available to all procedures in all modules in the entire workbook. (correct ?)
3. Now, does it matter where you assign a value to a Public variable ?
....3.a) Can you assign the value in a w/s event ? (Y / N)
....3.b) Can you assign the value in a w/b event ? (Y / N)
....3.c) Can you assign the value in a standard module ? (Y / N)
....3.d) It doesn't really matter where you assign a value to a Public variable
4. For those who are familiar with FORTRAN, is there a similarity between the FORTRAN (blank or named) COMMON data Block and the VBA Public Variables Declaration ?
Thank you.
1. If a variable is declared above all procedures in one module, then it is available to all procedures in that module. (correct ?)
2. If a variable at one module level is declared as Public, then it is available to all procedures in all modules in the entire workbook. (correct ?)
3. Now, does it matter where you assign a value to a Public variable ?
....3.a) Can you assign the value in a w/s event ? (Y / N)
....3.b) Can you assign the value in a w/b event ? (Y / N)
....3.c) Can you assign the value in a standard module ? (Y / N)
....3.d) It doesn't really matter where you assign a value to a Public variable
4. For those who are familiar with FORTRAN, is there a similarity between the FORTRAN (blank or named) COMMON data Block and the VBA Public Variables Declaration ?
Thank you.