Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if a folder excist

Status
Not open for further replies.

remco5897

Technical User
Oct 27, 2001
48
NL
Hi,

Does anybody know how I can check whether a specific directory excists.

For example, c:\documents\client1

thanks
 
Look at the following:

It checks for the directory and creates it if it doesn't exist.



Dim strPath As String

strPath = "G:\NewYorkBilling\Clearstream\" & CStr(Format(Forms![frmMain]![cboMonth], "yyyy"))

If Dir(strPath, vbDirectory) = "" Then
MkDir (strPath)
End If


****************************
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Thanks Robert, this exactly what I was looking for.

Stupid of me because your solution is so simple.


Kindest regards,

Remco
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top