If you use a function from Tom Ogilvy (working in 97-2003)
Function Split97(sStr As Variant, sdelim As String) As Variant
Split97 = Evaluate("{""" & _
Application.Substitute(sStr, sdelim, """,""") & """}")
End Function
Sub test2()
Dim fname As String
Dim sfname As String
Dim varr As Variant
fname = "C:\testfile.htm"
varr = Split97(fname, "\")
sfname = varr(UBound(varr))
MsgBox sfname
End Sub
--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl
"Jesse Hamilton" wrote in message news:BxSrb.16169$jy.13609@clgrps13...
Ok, next question, how would you keep all the text starting from the right
up until you encounter a "\"?
Jesse