Quote Originally Posted by xluser2007
As for your comment on dynamic variables - what exactly did you mean? What is an example of a dynamic variable?
I wasn't talking about dynamic variables, I was referring to dynamic loading of Environmental variables.

What I mean is that it seems that Excel loads the values of the environmental variables into memory upon startup, presumably to give faster access (sic!). Because of this, if those variables are updated during an Excel session, you will not see those changes until the next time that Excel starts.

But as I said, I don't foresee a problem with that with values such as computer name.

Quote Originally Posted by xluser2007
Do you feel that this function is suitable given the following context:
[/I] - To give some context for this thread, the purpose of this thread was to batch SAS programs using Excel-VBA as a front end. SAS is only run from the SAS Server, in this case using specific VBIDE references to the SAS Server libraries. As such I want the User to close the workbook that runs the SAS programs if they are haven't opened it from the SAS server. Will the Environ variables ever cause problems for this purpose?
I am not sure I understand this, but I wouldn't expect the environmental variables to be the thing to give you problems.