We Need Your Vote! ❤️ We're nominated for Best Microsoft Excel Add-In at the Global Excel Awards 2025! 🌟
You can turn our nomination into a win! 🏆 If ASAP Utilities has helped you save time or work smarter in Excel, please cast your vote today. Every vote counts!
logo ASAP Utilities

Excel tip: Check if a directory exists

Date: 9 june 2001

This function will return TRUE if the specified folder/direcotry exists, or FALSE if it doesn't.


Copy-paste friendly code:

Public Function CheckDir(Directory As String) As Boolean
      On Error GoTo ErrNotExist
      ChDir (Directory)
      CheckDir = True
      Exit Function
ErrNotExist:
      CheckDir = False
End Function



« back

Home Privacy Policy Cookie Policy EULA Download All added Excel tools Sitemap Contact Us


Empowering Excel Users Worldwide for 26 Years