DougRobertson
Active Member
- Joined
- Sep 22, 2009
- Messages
- 334
- Office Version
- 365
- Platform
- Windows
Hello,
I am trying to get a Variable to be accessible between 2 workbooks, and it appears that the Global scope is what I'm looking for. However, that doesn't appear to work for me.
Do I need to declare this at the beginning and above the first Sub Procedure of the first Module of the first Workbook of the code being used?
Also, do I need to use the "Option Explicit" code for this to work across 2 workbooks?
The declaration code I am using is:
Also, is it possible to use multiple variable names in one declaration, such as:
Thank you in advance for any and all help on this!
~ DWR
I am trying to get a Variable to be accessible between 2 workbooks, and it appears that the Global scope is what I'm looking for. However, that doesn't appear to work for me.
Do I need to declare this at the beginning and above the first Sub Procedure of the first Module of the first Workbook of the code being used?
Also, do I need to use the "Option Explicit" code for this to work across 2 workbooks?
The declaration code I am using is:
VBA Code:
Public iDISTRIBUTIONListFolder As String
Also, is it possible to use multiple variable names in one declaration, such as:
VBA Code:
Public iDISTRIBUTIONListFolder, iCOMPUTERName As String
Thank you in advance for any and all help on this!
~ DWR