
Sub GetEnviron_ViaIndex()
Dim x As Long
x = 1
Do Until Environ(x) = vbNullString
MsgBox x & ":=" & Environ(x)
x = x + 1
Loop
End Sub
'// So what can you use this for ?
Sub IsThisMyComputer()
If Environ("COMPUTERNAME") <> "The computername you need" Then
'Do your thing
MsgBox "NoGo!"
End
End If
End Sub
Sub WhatOperatingSys()
If Environ("OS") = "Windows_NT" Then
'Do your thing
MsgBox "Sorry NoGo!" & vbCr & "works on Win98 only"
End
End If
End Sub