Get the Windows directory of your OS Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long Private Sub Form_Load() Dim a As String * 256 GetWindowsDirectory a, 256 MsgBox Left(a, InStr(a, Chr(0)) - 1) End End Sub