ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Declaration of public variable - Question (https://www.excelbanter.com/excel-programming/341968-declaration-public-variable-question.html)

Les Stout[_2_]

Declaration of public variable - Question
 
Hi, i am sure a simple answer, but if i declare a public variable in the
first or "Start module", does that surfice for the whole project or must
one declare it in each module?

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***

Tom Ogilvy

Declaration of public variable - Question
 
a public variable declared in a general module should be visible throughout
the workbook/project. Declaring it anywhere else will hide it in the
location where it is declared again.

(this assumes the module is public, but that is the default).

--
Regards,
Tom Ogilvy


"Les Stout" wrote in message
...
Hi, i am sure a simple answer, but if i declare a public variable in the
first or "Start module", does that surfice for the whole project or must
one declare it in each module?

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***




Les Stout[_2_]

Declaration of public variable - Question
 
Thanks Tom

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com