Environment Object

来源:互联网 发布:node.js restful 框架 编辑:程序博客网 时间:2024/06/06 02:11

 

ExternalFileName Property
 'Check if an External Environment file is loaded and if not, load it.
 fileName = Environment.ExternalFileName
 If (fileName = "") Then
  Environment.LoadFromFile("C:/Environment.xml")
 End If

 'display value of one of the Environment variables from the External file
 msgbox Environment("MyVarName")


LoadFromFile Method

 Environment.LoadFromFile("C:/QuickTest/Files/MyVariables.xml")

 'MyVariables.xml
 <Environment>
         <Variable>
                <Name>This is the first variable's name</Name>
                <Value>This is the first variable's value</Value>
         </Variable>
 </Environment>

Value Property
 Environment.Value("MyVariable")=10
 MyValue=Environment.Value("MyVariable")