Check For Existing Folders & Files
I have some code that creates a folder and copies a file to it, named after user input, I need to be able to use the DIR function to check to see if the directory and file already exist.Any help?
***********************************************
Private Sub Command61_Click()
Dim Number As String
Dim source As String
Dim output As String
Dim output1 As String
Dim output2 As String
txtNumber.SetFocus
source = "e:\2005quotes\test.xlt"
'sets str value from access text box containing user supplied quote #
Number = txtNumber.Text
'names directory
output = "e:\2005quotes\" & Number & "\"
'names file
output1 = output & Number & ".xls"
'creates directory named after quote (user input)
MkDir (output)
'copies template to quotes directory
FileCopy source, output1
*****************************************
|