Folder Paths
Application.AutoRecover.Path
Dim sFolder As String
sFolder = Application.LibraryPath
This is the folder used when a workbook is Auto Recovered.
Excel 365 - C:\Program Files\Microsoft Office\root\Office16\LIBRARY
Excel 2021 - C:\Users\"user name"\AppData\Roaming\Microsoft\Excel
Excel 2019 - C:\Users\"user name"\AppData\Roaming\Microsoft\Excel
Excel 2016 - C:\Users\"user name"\AppData\Roaming\Microsoft\Excel
Application.AltStartupPath
sFolder = Application.AltStartupPath
This will be empty unless one has been added.
Application.DefaultFilePath
sFolder = Application.DefaultFilePath
This is the default local file location specified on the Options, Save tab.
Returns or sets the default path that Excel uses when it opens files.
Excel 365 - C:\Users\"user name"\Documents
Excel 2021 - C:\Users\"user name"\Documents
Excel 2019 - C:\Users\"user name"\Documents
Excel 2016 - C:\Users\"user name"\Documents
Application.LibraryPath
sFolder = Application.LibraryPath
It is possible to obtain the directory containing the built-in Excel add-ins.
You can save your own add-ins in this directory as well if you want them to appear in the Add-ins dialog box and made available to all the users on this machine.
Excel 365 - C:\Program Files\Microsoft Office\root\Office16\LIBRARY
Excel 2021 - C:\Program Files\Microsoft Office\OFFICE15\Library
Excel 2019 - C:\Program Files\Microsoft Office\OFFICE16\Library
Excel 2016 - C:\Program Files\Microsoft Office\OFFICE16\Library
Application.NetworkTemplatesPath
sFolder = Application.NetworkTemplatesPath
Returns the network path where templates are saved.
This is read only.
Application.Path
sFolder = Application.Path
This is the directory of the path where Excel.exe is stored.
Excel 365 - C:\Program Files\Microsoft Office\root\Office16
Excel 2021 - C:\Program Files\Microsoft Office\OFFICE15\
Excel 2019 - C:\Program Files\Microsoft Office\OFFICE16\
Excel 2016 - C:\Program Files\Microsoft Office\OFFICE16\
Application.PathSeparator
It is also possible to obtain the path separator character - only useful for compatibility with Macintosh.
Application.PathSeparator = "\"
Application.StartupPath
sFolder = Application.StartupPath
This is the directory of the start up path.
You can save your own add-ins in this directory and they will be loaded but they will not appear in the Add-ins dialog box.
Excel 365 - C:\Users\"user name"\AppData\Roaming\Microsoft\Excel\XLSTART
Excel 2021 - C:\Documents and Settings\"user name"\AppData\Microsoft\Excel\XLSTART
Excel 2019 - C:\Documents and Settings\"user name"\AppData\Microsoft\Excel\XLSTART
Excel 2016 - C:\Documents and Settings\"user name"\AppData\Microsoft\Excel\XLSTART
Application.TemplatesPath
sFolder = Application.TemplatesPath
This refers to the local Templates directory.
Excel 365 - C:\Users\"user name"\AppData\Roaming\Microsoft\Templates
Excel 2021 - C:\Users\"user name"\AppData\Roaming\Microsoft\Templates
Excel 2019 - C:\Users\"user name"\AppData\Roaming\Microsoft\Templates
Excel 2016 - C:\Users\"user name"\AppData\Roaming\Microsoft\Templates
Application.UserLibraryPath
sFolder = Application.UserLibraryPath
Returns the path to the location on the users computer where the COM add-ins are installed. Read Only string
Excel 365 - C:\users\"user name"\AppData\Roaming\Microsoft\AddIns\
Excel 2021 - C:\users\"user name"\AppData\Roaming\Microsoft\AddIns\
Excel 2019 - C:\users\"user name"\AppData\Roaming\Microsoft\AddIns\
Excel 2016 - C:\users\"user name"\AppData\Roaming\Microsoft\AddIns\
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext