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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top