DIM SHARED, SHARED and COMMON SHARED Statement?
- DIM SHARED statement is used to declare global variable in main module.
- SHARED statement is used to declare global variable in sub module. It is used to make the variable accessible which is declared at the module level without passing them as parameters.
- The COMMON SHARED is a non executable statement that declares global variables for sharing between modules (main program to sub program or function and vice versa).
- This statement declares the variable as global so that all modules can use this variable.
- Syntax: COMMON SHARED variable