Is there a way to give a variable Module scope

  • Thread starter Thread starter Just Me
  • Start date Start date
J

Just Me

Given a file containing Multiple classes and a variable that needs to be
seen in all the classes I can put it in one of the classes as Shared and
reference it the other classes as

TheOneItsIn.Variable

But is there a way to give a variable Module scope so it can be used in all
the classes without a prefix?

Thanks
 
Just said:
Given a file containing Multiple classes and a variable that needs to be
seen in all the classes I can put it in one of the classes as Shared and
reference it the other classes as

TheOneItsIn.Variable

But is there a way to give a variable Module scope so it can be used in all
the classes without a prefix?

You mean global scope, I think?

Module MGlobal

Public gMyGlobalVariable As Integer 'or whatever

End Module
 
Back
Top