• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Retrieving PDF file Name in excel

Good day webmax
Does this help?....

Code:
Function GetFilenameFromPath(ByVal strPath AsString)AsString
' Returns the rightmost characters of a string upto but not including the rightmost
'\'' e.g. 'c:\winnt\win.ini' returns 'win.ini'
If Right$(strPath,1)<>"\"And Len(strPath)>0Then GetFilenameFromPath = GetFilenameFromPath(Left$(strPath, Len(strPath)-1))+ Right$(strPath,1)
EndIfEndFunction
 
Back
Top