Modules and Forms

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
 
C

Chip Pearson

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)
 
P

Pedro

Thanks Chip

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

regards
Pedro
 

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

Top