T
Tom Ogilvy
How about
Sub aaaa_testscript()
Set WshShell = CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("VOLATILE")
Debug.Print WshSysEnv("LOGONSERVER")
End Sub
or
Sub aaaa_testscript()
Set WshShell = VBA.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("VOLATILE")
Debug.Print WshSysEnv("LOGONSERVER")
End Sub
remove the Wscript from CreateObject.
Regards,
Tom Ogilvy
Sub aaaa_testscript()
Set WshShell = CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("VOLATILE")
Debug.Print WshSysEnv("LOGONSERVER")
End Sub
or
Sub aaaa_testscript()
Set WshShell = VBA.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("VOLATILE")
Debug.Print WshSysEnv("LOGONSERVER")
End Sub
remove the Wscript from CreateObject.
Regards,
Tom Ogilvy