hey guys i need to return the directory name without the last \ at the end..

e..g.

name = "C:\hello.txt\"

should give me

C:\hello.txt

i tried MsgBox Right(Text5.Text, CInt(Len(Text5.Text) - 1)) but it doesnt work for some strings like this