Private Declare Function GetSystemDirectory _ > Lib "kernel32" _ > Alias "GetSystemDirectoryA" _ > (ByVal lpBuffer As String, _ > ByVal nSize As Long _ > ) As Long > >Public function GetWindowsDir() as string >Dim lngResult As Long >Dim strDir As String > > strDir = Space$(260) > lngResult = GetSystemDirectory(strDir, Len(strDir)) > GetWindowsDir = Left$(strDir, lngResult) > MsgBox GetWindowsDir >End SubI have just updated this API call in the API tab with this example.