Sub WRITE_TO_EXPLORER()
'Application.Calculation = xlCalculationManual
Set ws = ActiveSheet
Set id3 = CreateObject("CDDBControlRoxio.CddbID3Tag")
'- Compte le nomnre de fichiers
DERNIEREligne = ws.Range("B65536").End(xlUp).Row
nbreFICHIERS = ws.Range("B10:B" & DERNIEREligne).SpecialCells(xlCellTypeVisible).Count
If nbreFICHIERS = 0 Then MsgBox ("Aucun fichier trouvé"): Exit Sub
FilesChanged = 0
'- LOOP WORKSHEET FILES - VISIBLE ROWS ONLY
For LIGNE = 10 To DERNIEREligne
'If Cells(LIGNE, "B").EntireRow.Hidden = False Then
CHEMINetFICHIER = [D3] & "\" & Cells(LIGNE, "B").Value
'EXTENSION = UCase(Right(CHEMINetFICHIER, 3))
Application.StatusBar = FileCount & "\" & nbreFICHIERS & " " & CHEMINetFICHIER 'STATUSBAR
fichierINTERPRETE = Cells(LIGNE, 8) ' Auteurs
fichierTITRE = Cells(LIGNE, 9) ' Titre
fichierALBUM = Cells(LIGNE, 10) ' Album
fichierARTISTparticipe = Cells(LIGNE, 11) ' Artistes ayant participé
fichierANNEE = Cells(LIGNE, 12) ' Année
fichierGENRE = Cells(LIGNE, 13) ' Genre
fichierCOMMENTAIRES = Cells(LIGNE, 14) ' Commentaires
fichierNUMpiste = Cells(LIGNE, 17) ' N°
'- Write to file
With id3
.LoadFromFile CHEMINetFICHIER, False ' True = Read Only
.LeadArtist = fichierARTISTparticipe
.ALBUM = fichierALBUM
.GENRE = fichierGENRE
.Title = fichierTITRE
.Year = fichierANNEE
.Comments = fichierCOMMENTAIRES
.N° = fichierNUMpiste
If EXTENSION = "MP3" Then .TrackPosition = "1"
.SaveToFile CHEMINetFICHIER
End With
FilesChanged = FilesChanged + 1
'End If
Next
Application.StatusBar = False
End Sub