Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB Modules dhstein Excel Discussion (Misc queries) 9 November 8th 08 09:46 PM
Help with modules. Cloudy New Users to Excel 1 June 17th 08 10:10 AM
Need help on How to programatically Import VBA Project Excel Objects, Forms, Modules JMMach Excel Programming 7 October 21st 03 08:46 PM
Class Modules vs Modules Jeff Marshall Excel Programming 2 September 28th 03 07:57 PM
running all modules Jessi Excel Programming 1 July 29th 03 08:31 PM


All times are GMT +1. The time now is 12:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"