,取字符串

求助,取字符串格式c:\aaa\123456.txtc:\aaa\123456789.txtc:\aaa\123.txt现在想去出文本文件名称,但文本文

求助,取字符串
格式
c:\aaa\123456.txt
c:\aaa\123456789.txt
c:\aaa\123.txt
现在想去出文本文件名称,但文本文件名称不固定,不知道改如何取,请各位帮忙。感谢。

[解决办法]
把下列代码拷到VB窗体中执行吧:

Option Explicit

Private Sub Command1_Click()
Dim str1 As String
Dim j As Integer
Dim strfile As String

Dim tmp() As String

str1 = Trim(Text1.Text)
tmp = Split(str1, "\ ")
j = UBound(tmp)
strfile = tmp(j)
MsgBox strfile
End Sub

Private Sub Form_Load()
Text1.Text = "d:\jadlksfj\jakdlsjf\黑乎乎.txt "
End Sub