Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Global Variables
I have a directory with about 20 excel files and want them to all shar the same global variables once they are run. I was thinking of doin this by creating a "vars.ini" file in the same directory and have the all load the variables once opened. This way I can set the ini fil once, and it would affect all the excel files equally. Is this feasible approach? Matt -- mattsva ----------------------------------------------------------------------- mattsvai's Profile: http://www.excelforum.com/member.php...fo&userid=3113 View this thread: http://www.excelforum.com/showthread.php?threadid=50815 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Global Variables
If you are talking about traditional global variables such as
Public MyVar at the top of a module and you don't want to declare it at the top of the module, then perhaps you could import a module with the declarations (a .bas file - again this is nothing but a text file). If your talking about declaring them, but initializing them by having your code opening an INI file (which is nothing but a text file) and setting the values, then that is feasible. -- Regards, Tom Ogilvy "mattsvai" wrote in message ... I have a directory with about 20 excel files and want them to all share the same global variables once they are run. I was thinking of doing this by creating a "vars.ini" file in the same directory and have them all load the variables once opened. This way I can set the ini file once, and it would affect all the excel files equally. Is this a feasible approach? Matts -- mattsvai ------------------------------------------------------------------------ mattsvai's Profile: http://www.excelforum.com/member.php...o&userid=31134 View this thread: http://www.excelforum.com/showthread...hreadid=508150 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Global Variables
Sounds good :) Thanks Tom -- mattsva ----------------------------------------------------------------------- mattsvai's Profile: http://www.excelforum.com/member.php...fo&userid=3113 View this thread: http://www.excelforum.com/showthread.php?threadid=50815 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Global Variables
I have a class for reading an INI file if it is of interest to you I could
send you a copy... It will make what you are about to do "plug and play"... -- HTH... Jim Thomlinson "mattsvai" wrote: Sounds good :) Thanks Tom! -- mattsvai ------------------------------------------------------------------------ mattsvai's Profile: http://www.excelforum.com/member.php...o&userid=31134 View this thread: http://www.excelforum.com/showthread...hreadid=508150 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Global Variables | Excel Programming | |||
global variables | Excel Programming | |||
Global variables - where do you place them? | Excel Programming | |||
Global Variables | Excel Programming | |||
Global vs Local variables | Excel Programming |