xanadude
Newbie - but learning fas
- Local time
- Today, 21:01
- Joined
- Feb 2, 2011
- Messages
- 65
Hi All Again
I was wondering how do you use a variable (Counter for instance) between different subs
What I have is a Private Sub MySub() that Calls a Public Sub MyOtherSub()
I have set the counter in MySub at the start to be 0
Do Some of my stuff then calls the Public Sub to do something else with If /Else If in. Depending what is done in the Called Sub the "Counter" will be changed from 0 to 1 or left at 0.
Then goes back to MySub to finish up.
The thing I cant seem to get my head around is why the Counter even when changed in MyOtherSub() is not changed in MySub().....
I have not got to learning modules and such yet
Sorry if this sound confusing.
Thanks
I was wondering how do you use a variable (Counter for instance) between different subs
What I have is a Private Sub MySub() that Calls a Public Sub MyOtherSub()
I have set the counter in MySub at the start to be 0
Do Some of my stuff then calls the Public Sub to do something else with If /Else If in. Depending what is done in the Called Sub the "Counter" will be changed from 0 to 1 or left at 0.
Then goes back to MySub to finish up.
The thing I cant seem to get my head around is why the Counter even when changed in MyOtherSub() is not changed in MySub().....
I have not got to learning modules and such yet
Sorry if this sound confusing.
Thanks