Function GetDirName(sFile As String) As String
'Version: 1.001
'Purpose: Gets the file directory dropping any files
Dim i As Long
GetDirName = ""
For i = Len(sFile) To 1 Step -1
If Mid(sFile, i, 1) = "\" Then
GetDirName = Mid(sFile, 1, i)
Exit Function
End If
Next