Private Declare Function GetTempPath Lib "kernel32.dll" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal Buffer As String) As LongPublic Sub Test() Dim Buffer As String * 255 Call GetTempPath(255, Buffer) Debug.Print BufferEnd Sub