You can use the InStrRev function as follows:
Hope this is what you were looking for.Code:Dim iSeparatorPos As Integer Dim sFullPath As String Dim sSubDir As String sFullPath = Mailouts.SelectedFolder If Right(sFullPath, 1) = "\" Then sFullPath = Mid(sFullPath, 1, Len(sFullPath) - 1) End If iSeparatorPos = InStrRev(sFullPath, "\") If iSeparatorPos > 0 Then sSubDir = Mid(sFullPath, iSeparatorPos + 1) Else sSubDir = sFullPath End If Call MsgBox(sSubDir)




Reply With Quote