Get the windows directory . You will need to add a reference to the Microsoft Scripting runtime. This is useful for your apps because the user does not always have Windows installed in the default location.
Private Sub Form_Load()
Dim objFso As FileSystemObject
Dim WindowsPath As String
Set objFso = New FileSystemObject
WindowsPath = objFso.GetSpecialFolder(WindowsFolder)
MsgBox (WindowsPath)
End Sub
|