Public Variable in ThisWorkbook  
Author Message
mjmsurrey





PostPosted: Mon Apr 11 12:48:26 CDT 2005 Top

Excel Programming >> Public Variable in ThisWorkbook

I want to declare some public variables as soon as I open the workbook. Can
I do that in "ThisWorkbook" or do I need to put it in a module and have
"ThisWorkbook" Open event call a routine to set the public variables?

Excel241  
 
 
Chip





PostPosted: Mon Apr 11 12:48:26 CDT 2005 Top

Excel Programming >> Public Variable in ThisWorkbook If the variables are going to be used in procedures outside the
ThisWorkbook module, you should declare them in the declarations
section of a regular code module, and initialize them in the Open
event procedure.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




>I want to declare some public variables as soon as I open the
>workbook. Can
> I do that in "ThisWorkbook" or do I need to put it in a module
> and have
> "ThisWorkbook" Open event call a routine to set the public
> variables?
>
>


 
 
DRKML





PostPosted: Mon Apr 11 13:16:38 CDT 2005 Top

Excel Programming >> Public Variable in ThisWorkbook Thank you.



> If the variables are going to be used in procedures outside the
> ThisWorkbook module, you should declare them in the declarations
> section of a regular code module, and initialize them in the Open
> event procedure.
>
>
> --
> Cordially,
> Chip Pearson
> Microsoft MVP - Excel
> Pearson Software Consulting, LLC
> www.cpearson.com
>
>


> >I want to declare some public variables as soon as I open the
> >workbook. Can
> > I do that in "ThisWorkbook" or do I need to put it in a module
> > and have
> > "ThisWorkbook" Open event call a routine to set the public
> > variables?
> >
> >
>
>