Environ Function

Returns the value of an environment variable as a string. Environment variables are dependent on the type of operating system that you have.

Syntax:


Environ (Environment As String)

वापसी मूल्य:

वाक्यांश

पैरामीटर

वातावरण: एनवायरनमेंट वेरिएबल जिसका मूल्य आप प्राप्त करना चाहते हैं.

Error codes:

5 Invalid procedure call

उदाहरण:


Sub ExampleEnviron
Dim sTemp As String
    sTemp=Environ ("TEMP")
    If sTemp = "" Then sTemp=Environ("TMP")
    MsgBox "'" & sTemp & "'" ,64,"Directory of temporary files:"
End Sub

Please support us!