Modules and Forms

  • Thread starter Thread starter Pedro
  • Start date Start date
P

Pedro

Hi,
I have a module that call a form using frmMain.Show
the form gets a value for a variable xxx=12 but whenever it turns to the
module (by doing frmMain.Hide) the xxx has no value
What change should I make to the code in order to have the variable.

Regards

Pedro
 
Pedro,

Where are you declaring the variable? If you declare it as a public
variable in a standard code module, outside of and before any procedure, it
will be available to all procedures in the project. E.g.,

Public X As Long


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
Thanks Chip

I already declared as a public variable doing "Public strNoM As Variant".
Any reason why this happens?

regards
Pedro
 
Back
Top