Hmm... I've been trying a lot in order to isolate the filename from the path, but nothing works.
If Len(T_001) = 5 Then
OptionButton1.Value = True
History = T_001.Value
ActiveSheet.Range("A1").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromRight 'OrAbove
Sheets("Sheet1").Range("A1") = History
st = Filter(sn, T_001, , 1)
'st = Mid$(Filter(sn, T_001, , 1), InStrRev(Filter(sn, T_001, , 1), "\") + 1, Len(Filter(sn, T_001, , 1))) ' doesn't work!!
If UBound(st) > -1 Then
'LB_001.List = st ' This works, but displays the entire path
LB_001.List = Mid$(st, InStrRev(st, "\") + 1, Len(st)) ' This doesn't either!!
Else
LB_001.List = Array(" ( no file found )")
End If
A. Would it be possible to isolate the filename from the path?
B. Could the listed files in LB_001 be transferred to another listbox (LB_005) if the list only contains the filename and not the path (and later added to an email)?
C. If B = No, should I then cheat and have two listboxes LB_001 and LB_002 which contain the same results... so if I pick listindex 3 in LB_001 it actually just moves listindex 3 from LB_002 to LB_005
LB_001 = Only the filename
LB_002 = file name incl. path (this listbox can't be seen/isn't visible on the Userform)
I'd be happy to have your comments