Results 1 to 2 of 2

Thread: Get a file name

  1. #1
    Join Date
    Apr 2002

    Unanswered: Get a file name

    I use a GetOpenFileName function to get a full file path.
    What I want to do is to get only the file name itself. How
    do I do this ? Thanks.

    Full file path examples : "C:/Excel Files/File/Sample.xls"

    So I want to have is Sample.xls or Example.xls

  2. #2
    Join Date
    Nov 2001
    Hi Milan,

    Try the function below:

    Public Function test(ByVal FullName As String) As String

    test = Right(FullName, Len(FullName) - InStrRev(FullName, "\"))

    End Function


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts