Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modules and Forms
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modules and Forms
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 "Pedro" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modules and Forms
Thanks Chip
I already declared as a public variable doing "Public strNoM As Variant". Any reason why this happens? regards Pedro "Chip Pearson" wrote in message ... 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 "Pedro" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VB Modules | Excel Discussion (Misc queries) | |||
Help with modules. | New Users to Excel | |||
Need help on How to programatically Import VBA Project Excel Objects, Forms, Modules | Excel Programming | |||
Class Modules vs Modules | Excel Programming | |||
running all modules | Excel Programming |