By using t2do.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes
GetDirName(sFile)
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