Sunday
Jul152007
Extract & determine a workbook name from its file path: VBA Excel

Private Function StripFromPath(FullPath As String) As String ' Cut the file name out of a full path
Dim szStrip As String
Dim szFile As String
Dim i As Long
If Len(FullPath) > 0 Then
szStrip = CStr(Empty)
i = Len(FullPath)
Do While szStrip "\"
szStrip = Mid$(FullPath, i, 1)
If szStrip = "\" Then
szFile = Right$(FullPath, Len(FullPath) - i)
End If
i = i - 1
Loop
StripFromPath = szFile
End If
Reader Comments (1)
Thank for your time to share us this discuss, i have some opinion on the <a href="http://www.dressaler.com/" title="Formal Dresses">Formal Dresses</a>, I feel so stronl about your article, and learning more on this topic, then it is so good, Do you have time visit us <a href="http://www.dressaler.com/wedding-party-dress/bridesmaid-dresses.html" title="Wedding Bridesmaid Dresses">Wedding Bridesmaid Dresses</a>.I will bookmark your blog and have my kids check up here frequently <a href="http://www.dressaler.com/wedding-party-dress/junior-bridesmaid-dresses.html" title="Junior Bridesmaid Dresses">Junior Bridesmaid Dresses</a>. I’m very certain they will understand lots of new stuff here than anybody else. I do appreciate that youve added relevant and intelligent commentary here though. Thank you!