D
Denis
I'm having trouble accessing a public variable in a module when this
public variable is declared in another module. Here's my situation
where I have 2 forms and 2 modules:
form1
form2
module1
Public TWB As Object
load form1 ' works fine
module2
load form2 ' TWB is Nothing
The TWB public variable is Set in the Autpen() (actually in another
module) so it is always set.
Both form1 and form2 reference TWB in their form initialization but
TWB shows up as set to Nothing when form2 is loaded in module2.
However, if I move the Public statement from module1 to module2 then
loading form2 works fine.
So what am I doing wrong? Supposedly public variables are accessible
across all modules in the same project and I'm not using any 'option
private module.'
Denis
public variable is declared in another module. Here's my situation
where I have 2 forms and 2 modules:
form1
form2
module1
Public TWB As Object
load form1 ' works fine
module2
load form2 ' TWB is Nothing
The TWB public variable is Set in the Autpen() (actually in another
module) so it is always set.
Both form1 and form2 reference TWB in their form initialization but
TWB shows up as set to Nothing when form2 is loaded in module2.
However, if I move the Public statement from module1 to module2 then
loading form2 works fine.
So what am I doing wrong? Supposedly public variables are accessible
across all modules in the same project and I'm not using any 'option
private module.'
Denis