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.

āļšāˇāļģāļš āļģāˇ“āļ­āˇ’āļē:


Environ (Environment As String)

āļ†āļ´āˇƒāˇ” āļŊāļļāˇāļ¯āˇ™āļą āļ…āļœāļē:

String

āļ´āļģāˇāļ¸āˇ’āļ­āˇ“āļąāˇŠ:

Environment: Environment variable that you want to return the value for.

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!