Edit ID3 tag - issue updating Comments tag

geosam

New Member
Joined
Apr 9, 2014
Messages
3
I have written 2 separate routines to read and update MP3 ID3 tags. I am facing an issue with the Update Tag routine. It updates all tags except for the Comment tag.

I have pasted my code below. Appreciate if someone can let me know if I am doing something wrong.
-------------------------------------------------------------------------------------------------------------------

Dim id3 As Object
Dim LastRow As Long
Dim MyFilePathName As String ' full path & file name
Dim MyFileType As String ' mp3 wma etc.

Dim MyTitle As String
Dim MyArtist As String
Dim MyAlbum As String
Dim MyYear As Variant
Dim MyGenre As String
Dim MyTrack As Variant
Dim MyComments As String

Sub Update_Tags()

Set id3 = CreateObject("CDDBControlRoxio.CddbID3Tag")
LastRow = Cells(2, 1).End(xlDown).Row

For r = 2 To LastRow
If Cells(r, 11) = "Y" Then
'Get file properties from sheet
MyFilePathName = Cells(r, 1) & "\" & Cells(r, 2) & "." & Cells(r, 3) 'Path, filename and Extension are stored in Column A, B and C respectively
MyFileType = Cells(r, 3)

MyTitle = Cells(r, 4)
MyArtist = Cells(r, 5)
MyGenre = Cells(r, 6)
MyAlbum = Cells(r, 7)
MyYear = Cells(r, 8)
MyTrack = Cells(r, 9)
MyComments = Cells(r, 10)

' Write to file
With id3
.LoadFromFile MyFilePathName, False
.Title = MyTitle
.LeadArtist = MyArtist
.Album = MyAlbum
.Year = MyYear
.Genre = MyGenre
.Comment = MyComments

If LCase(MyFileType) = "mp3" Then
.TrackPosition = MyTrack
End If

.SaveToFile MyFilePathName
End With

Range("D" & r & ":J" & r).Copy Range("L" & r & ":R" & r)

End If
Next

ThisWorkbook.Save

End Sub
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,214,968
Messages
6,122,509
Members
449,089
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top