

Microsoft realizes how vulnerable files are to corruption or getting lost so they often include in-built tools in their programs that can help locate and restore lost files. Like: C:\Documents and Settings\username\My Documents\My Pictures.If you can no longer locate an Excel file that you were just working on an hour ago, don’t fret, it might not be lost permanently and if you act quickly, you might find it again. This corresponds to the %windir% or %SYSTEMROOT% environment variables. Like: C:\Documents and Settings\All Users\Application Data. '34=File system directory for Internet history items.

Like: C:\Documents and Settings\username\Cookies. '33=File system directory for Internet cookies. Like: C:\Documents and Settings\username\Temporary Internet Files. '32=File system directory for temporary Internet files. '31=File system directory for all users' favorite items. '30=File system directory that corresponds to the nonlocalized Startup program group for all users. '29 = File system directory that corresponds to the user's nonlocalized Startup program group. Like: C:\Documents and Settings\username\Local Settings\Application Data. File system directory the data repository for local (non-roaming) applications. Like: C:\Documents and Settings\username\PrintHood. '27=File system directory, the link objects that may exist in the Printers virtual folder. '26=File system directory current application data. Like: C:\Documents and Settings\All Users\Desktop. '25=File system directory, files and folders the desktop for all users. Like: C:\Documents and Settings\All Users\Start Menu\Programs\Startup. '24=File system directory, the programs in the Startup folder for users. Like: C:\Documents and Settings\All Users\Start Menu\Programs. '23=File system directory, the directories for the program groups the Start menu for users. Like: C:\Documents and Settings\All Users\Start Menu. '22=File system directory, the programs and folders the Start menu for users. '21=File system directory for document templates. '19=A file system folder the link objects that may exist in the My Network Places virtual folder. '18=Network Neighborhood, virtual folder representing the root of the network namespace hierarchy. '17=My Computer, virtual folder for the local computer: storage devices, printers, and Control Panel, may also contain mapped network drives. Like: C:\Documents and Settings\username\Desktop. Not the desktop folder itself, A virtual folder. '16=File actual system directory used to store the file objects displayed the desktop. '15=Virtual folder the objects in the user's Recycle Bin. Like: C:\Documents and Settings\username\Start Menu. '11=File system directory Start menu items. Like: C:\Documents and Settings\username\SendTo. '9=File system directory, Send To menu items. Like: C:\Documents and Settings\username\Recent. '8=File system directory, the user's most recently used documents. Like: C:\Documents and Settings\username\Start Menu\Programs\Startup. '7=File system directory, the Startup program group that starts on log to Win NT or Win 95. Like: C:\Documents and Settings\username\Favorites. '6=File system directory, for the user's favorite items. Like: C:\Documents and Settings\username\My Documents. '5=File system directory, for user's documents. '3=Virtual folder icons for the Control Panel applications. Like: C:\Documents and Settings\username\Start Menu\Programs. '2=File system directory, the user's program groups (also file system directories). '0 or missing=MS Win DesktopÂ-virtual folder that is the root of the namespace. MyPath = BrowseForFolder("Please select your folder", 17) Set Folder = Shell.BrowseForFolder(0, Title, 0, RootFolder)īrowseForFolder = (Folder.Title).Path Set Shell = CreateObject("Shell.Application") Private Function BrowseForFolder(Title As String, Optional RootFolder As Variant) As String
