Public Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Use as follows:
Dim sDir As String
Dim lBuf As Long
Dim lReturn As Long
lBuf = 100
sDir = Space$(lBuf)
lReturn = GetTempPath(lBuf, sDir)
If lReturn = 0 Then
sDir = App.Path
Else
sDir = Left$(sDir, lReturn)
End If
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.