GetEnviron Method

Gets the specified environment variable from the environment of the current process.

Syntax

obj.GetEnviron(EnvironmentVariable String)
Where obj is an OpScrUtil.Utility object

Parameters

EnvironmentVariable Specifies the environment variable to retrieve.

Return Type

String.

Example

To get the PATH environment variable, enter:

Set obj = CreateObject("OpScrUtil.Utility")
sPath = obj.GetEnviron("PATH")
MsgBox "PATH is " & sPath