Link to home
Start Free TrialLog in
Avatar of isnoend2001
isnoend2001Flag for United States of America

asked on

get just the last part of a file name after the last "\"

FileName with path:
C:\Documents and Settings\All Users.WINDOWS\Documents\Real20CardKeno\KingKeno\SavedKingKenoGames\9-spot bet 1.50.cle
how can i extract just the 9-spot bet 1.50.cle ?
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, change

Dim strParts As String

to

Dim strParts() As String

and

Split(?C:\Documents and Settings\All Users.WINDOWS\Documents\Real20CardKeno\KingKeno\SavedKingKenoGames\9-spot bet 1.50.cle","\")

to

Split("C:\Documents and Settings\All Users.WINDOWS\Documents\Real20CardKeno\KingKeno\SavedKingKenoGames\9-spot bet 1.50.cle","\")

I apologize for the mistakes.
Avatar of isnoend2001

ASKER

Thanks again.
Learned something unrelated.
seems Thunderbird does not show new mail icon on taskbar if inbox is not open. At least i think is why i am not getting notifications on the task bar
Seems vb gives an error
Dim strParts As String
      strParts = Split(myfile, "\")
      Debug.Print strParts(UBound(strParts))<-- expected array
Sorry, can't help you with Thunderbird but once again I'm happy I was able to answer your question.
Sorry, can't help you with Thunderbird but once again I'm happy I was able to answer your question.
Please see my second post.
gottacha missed the
Dim strParts() As String
thanks