C
cagri mollamahmutoglu
Basically i am trying to put all of subroutines which are under
thisworkbook section into different modules. for example if there are
sub1,sub2,sub3 under thisworkbook code window such that
sub0
call sub1
call sub2
endsub0
sub1
endsub1
sub2
end sub2
I want to write or move sub1 and sub2 into different modules such as
into module1 and module 2 respectively:
module1
sub1
end sub1
module2
sub1
end sub1
but the problem is when sub1 calculates and obtains a results and
assigns it to a variable which will be used in sub2 it is already
erased when module1 closes and module2 opens to call sub2. so the
question is what can I do so that the values which are assigned to
variables in a module are preserved or stick so they can be used by
other subs in other modules?
thisworkbook section into different modules. for example if there are
sub1,sub2,sub3 under thisworkbook code window such that
sub0
call sub1
call sub2
endsub0
sub1
endsub1
sub2
end sub2
I want to write or move sub1 and sub2 into different modules such as
into module1 and module 2 respectively:
module1
sub1
end sub1
module2
sub1
end sub1
but the problem is when sub1 calculates and obtains a results and
assigns it to a variable which will be used in sub2 it is already
erased when module1 closes and module2 opens to call sub2. so the
question is what can I do so that the values which are assigned to
variables in a module are preserved or stick so they can be used by
other subs in other modules?