Folder Paths


Application.AutoRecover.Path

Dim sFolder As String 
sFolder = Application.LibraryPath

This is the folder used when a workbook is Auto Recovered.
2016 - C:\Users\"user name"\AppData\Roaming\Microsoft\Excel
2013 - C:\Users\"user name"\AppData\Roaming\Microsoft\Excel
2010 - C:\Users\"user name"\AppData\Roaming\Microsoft\Excel
2007 - 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 

Returns or sets the default path that Excel uses when it opens files.
2016 -
2013 -
2010 -
2007 -


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 made available to all the users on this machine.
2016 - C:\Program Files\Microsoft Office\OFFICE16\Library
2013 - C:\Program Files\Microsoft Office\OFFICE15\Library
2010 - C:\Program Files\Microsoft Office\OFFICE14\Library
2007 - C:\Program Files\Microsoft Office\OFFICE12\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.
2016 - C:\Program Files\Microsoft Office\OFFICE16\
2013 - C:\Program Files\Microsoft Office\OFFICE15\
2010 - C:\Program Files\Microsoft Office\OFFICE14\
2007 - C:\Program Files\Microsoft Office\OFFICE12\


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.
2016 - C:\Documents and Settings\"User name"\Application Data\Microsoft\Excel\XLSTART
2013 - C:\Documents and Settings\"User name"\Application Data\Microsoft\Excel\XLSTART
2010 - C:\Documents and Settings\"User name"\Application Data\Microsoft\Excel\XLSTART
2007 - C:\Documents and Settings\"User name"\Application Data\Microsoft\Excel\XLSTART


Application.TemplatesPath

sFolder = Application.TemplatesPath 

This refers to the local Templates directory.
2016 - C:\Users\"User name"\AppData\Roaming\Microsoft\Templates
2013 - C:\Users\"User name"\AppData\Roaming\Microsoft\Templates
2010 - C:\Users\"User name"\AppData\Roaming\Microsoft\Templates
2007 - 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
2016 - C:\users\"user name"\AppData\Roaming\Microsoft\AddIns\
2013 - C:\users\"user name"\AppData\Roaming\Microsoft\AddIns\
2010 - C:\users\"user name"\AppData\Roaming\Microsoft\AddIns\
2007 - C:\users\"user name"\AppData\Roaming\Microsoft\AddIns\



© 2017 Better Solutions Limited. All Rights Reserved. © 2017 Better Solutions Limited

PrevNext