03-30-2005, 02:01 AM
If you have two or more sub functions that use the same variable, where must i declare that variable...
Imagine the sub doA reads a file and give a valor to a variable called X, then in the suB we use the X variable, if I declare the X variable at the beginning of the program it gives an error, if I declare the X variable in every sub function with dim X, it erase the X valor.....
Sorry if this question is silly, but I am starting using sub functions...
thanks.
Imagine the sub doA reads a file and give a valor to a variable called X, then in the suB we use the X variable, if I declare the X variable at the beginning of the program it gives an error, if I declare the X variable in every sub function with dim X, it erase the X valor.....
Sorry if this question is silly, but I am starting using sub functions...
thanks.