Const MAX_PATH = 255 Private Declare Function GetSystemDirectory Lib "kernel32" _ Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, _ ByVal nSize As Long) As Long Public Function SystemDir() As String Dim sRet As String, lngRet As Long sRet = String$(MAX_PATH, 0) lngRet = GetSystemDirectory(sRet, MAX_PATH) SystemDir = Left(sRet, lngRet) End Function