Private mstrFullFileName As String
Private mstrDrive As String
Private mstrPath As String
Private mstrName As String
Public Property Get FullFileName() As String
FullFileName = mstrFullFileName
End Property
Public Property Let FullFileName(ByVal strFileName As String)
Call GetDrive(strFileName)
Call GetPath(strFileName)
Call GetName(strFileName)
End Property
Public Property Get Drive() As String
Drive = mstrDrive
End Property
Public Property Get Path() As String
Path = mstrPath
End Property
Public Property Get Name() As String
Name = mstrName
End Property
Private Sub GetDrive(ByVal strFile As String)
mstrDrive = Left(strFile, InStr(strFile, ":"))
End Sub
Private Sub GetPath(ByVal strFile As String)
mstrPath = Mid(strFile, 1, InStrRev(strFile, "\"))
End Sub
Private Sub GetName(strFile)
mstrName = Mid(strFile, InStrRev(strFile, "\") + 1)
End Sub
|