1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Function RecupGroupTitre(ChemNom)
RecupGroupTitre = Mid(ChemNom, InStrRev(ChemNom, "/", Len(ChemNom), vbTextCompare) + 1, Len(ChemNom) - ((InStrRev(ChemNom, "/", Len(ChemNom), vbTextCompare) + 1) + 3))
End Function
Function RecupGroup(GroupTitre)
RecupGroup = Left(GroupTitre, InStr(1, GroupTitre, " -", vbTextCompare) - 1)
End Function
Function RecupTitre(GroupTitre)
RecupTitre = Right(GroupTitre, InStr(1, GroupTitre, "- ", vbTextCompare) - 1)
End Function
Dim Cas1 As String, Cas2 As String
Cas1 = "http://localhost/domaine/Tablatures/tablatures/Guns'n Roses/Guns N' Roses - Back Off Bitch.gp3"
Cas2 = "http://localhost/domaine/Tablatures/Guitar Pro Tabs - My Songbook/C/Children Of Bodom - Angels Don 't Kill.gp4"
MsgBox "Groupe: " & RecupGroup(RecupGroupTitre(Cas1)) _
& vbNewLine & "Titre: " & RecupTitre(RecupGroupTitre(Cas1)), vbInformation, "CAS N°1"
MsgBox "Groupe: " & RecupGroup(RecupGroupTitre(Cas2)) _
& vbNewLine & "Titre: " & RecupTitre(RecupGroupTitre(Cas2)), vbInformation, "CAS N°2" |
Partager