Re: Public Variable in ThisWorkbook
"Chip Pearson" <chip@xxxxxxxxxxxx> wrote in message
> 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.
> Chip Pearson
> Microsoft MVP - Excel
> Pearson Software Consulting, LLC
> "DRKML" <DklineCLUChFC@xxxxxxxxxxx> wrote in message
> >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?
- Re: Public Variable in ThisWorkbook
... ThisWorkbook module, you should declare them in the declarations ... Pearson Software Consulting, LLC ... >I want to declare some public variables as soon as I open the ...
- Re: Declaring Constants that can be used throughout the Workbook :)
... If you put it in the ThisWorkbook module, you have to declare it as public ... and to precede it with ThisWorkbook when being used in another module ... > Private Sub Testing_Button_Click ...
- Re: Best Practices Question
... My preference is to only declare public ... I don't use Public variables unless absolutely required and there is no other way to accomplish the task at hand. ... In code I design for my libraries, I might use a module-level Private variable, but only in cases when the code is designed to be imported as a complete, stand-alone module. ... If a proc is designed to be imported/copied in as only a single procedure, not a full module, that code never relies on the existence of anything at all. ...
- RE: Report will not access public variables from form
... The public variables are in the declarations section of the form's module so ... > where then declare them in a module and not in your form. ... >> After a save record on the form, I send a report by email that tells the ... >> Me.txtPartNoNew = gstrPARTNoNew ...
- Re: Using a Public Array
... You can refer to the form to get at public variables defined in the form: ... Doug Steele, Microsoft Access MVP ... (no private e-mails, please) ... I can't declare the array as public ...