Hi everyone
this is my own easy way to extract directories from file name
it may sound naive but it does work , try the sample in the attachment
I am not smart enough to put it in the form of user's function
would you please do it for the sake of all
Thank you
this is my own easy way to extract directories from file name
PHP:
Private Sub doit_Click()
Dim rght As String
Dim lft As String
Dim fnl As String
Dim i As Integer
i = 1
Do Until lft = "\"
rght = Right(Me.pth.Value, i)
lft = Left(rght, 1)
i = i + 1
Loop
fnl = Replace(Me.pth.Value, rght, "")
MsgBox fnl
End Sub
it may sound naive but it does work , try the sample in the attachment
I am not smart enough to put it in the form of user's function
would you please do it for the sake of all
Thank you