ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create Global Variables in a module (https://www.excelbanter.com/excel-programming/300023-create-global-variables-module.html)

bruce

Create Global Variables in a module
 
Is it possible to set variables for access to all sub routines and functions within a module?

eg. pathB = ThisWorkbook.Path is refer to this in many sub routines

Bruce

Bob Phillips[_6_]

Create Global Variables in a module
 
Bruce,

Declare the variable outside of a macro, at the start of the module. They
can then be set/read from any procedure in that module.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Bruce" wrote in message
...
Is it possible to set variables for access to all sub routines and

functions within a module?

eg. pathB = ThisWorkbook.Path is refer to this in many sub routines

Bruce





All times are GMT +1. The time now is 08:02 AM.

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