Turpis
Programmer
- Apr 16, 2002
- 151
What is the VB equivlant to %systemroot%?
Charles
Walden's Machine, Inc.
Quality Assurance/Office Developer
Charles
Walden's Machine, Inc.
Quality Assurance/Office Developer
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Private Declare Function GetEnvironmentVariable Lib "kernel32" Alias "GetEnvironmentVariableA" (ByVal lpName As String, ByVal lpBuffer As String, ByVal nSize As Long) As Long
Function GetEnvironmentVar(sName As String) As String
'KPD-Team 2000
'URL: [URL unfurl="true"]http://www.allapi.net/[/URL]
'E-Mail: KPDTeam@Allapi.net
GetEnvironmentVar = String(255, 0)
GetEnvironmentVariable sName, GetEnvironmentVar, Len(GetEnvironmentVar)
If InStr(1, GetEnvironmentVar, Chr$(0)) > 0 Then GetEnvironmentVar = Left$(GetEnvironmentVar, InStr(1, GetEnvironmentVar, Chr$(0)) - 1)
End Function