Well, what is the value of "Filename"
if the value if filename is something like:
C:\someFolder\anotherFolder\filename.txt
then well, thats the problem. In this case, to get the filename only:
Me.Text = fileName.SubString(filename.LastIndexOf("\"))
This will get all the text after the last backslash, just the filename.
hope it helps!
|