by Shane Manaton (2 Submissions)
Category: Windows System Services
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
Easy way to return system variables
Assumes
none, none ,none
Side Effects
your coding becomes a lot quicker!!
API DeclarationsNone!!!
Private Sub Form_Load()
For i = 1 To 30
MsgBox Environ(i), vbOKOnly, i
Next i
End Sub
I have seen loads of complicated code that does the same
Try this code, every system variable you need in one line of code
Usage:
MsgBox Environ("ComputerName")
MsgBox Environ("Path")
Etc