Private Sub Form_Load() Dim sysenv As Object Set sysenv = CreateObject("WScript.Shell").Environment("system") MsgBox sysenv("vbtest") sysenv("vbtest") = "test ok" MsgBox sysenv("vbtest") End Sub