D_Marcel
01-09-2014, 07:01 AM
Hello Masters!
Hope that everything is doing well with everybody.
I got from internet a simple and functional code to update MP3 tags by loading the extension cddbcontrol.dll. The problem is that the Excel always stops responding after some time of execution. I separated all my files in lots of 800. I could update the first one successfully, but now even with smaller lots, Excel suddenly stops responding and restarts.
Do you have an idea of what can cause this? This is the code:
Sub Updater()
Dim Register As Range
Dim ID3 As New CddbID3Tag
Set WorkArea = Plan1.Range(Cells(5, 1), Cells(Cells(Rows.Count, 1).End(xlUp).Row, 1))
RowCounter = Cells(Rows.Count, 1).End(xlUp).Row - 4
For Each Register In WorkArea
Counter = Counter + 1
Application.Wait Now + TimeValue("00:00:01")
Application.StatusBar = "Updating tags from file " & Counter & " of " & _
RowCounter & " | Progress : " & Format((Counter) / RowCounter, "Percent")
ID3.LoadFromFile Register.Value, False
ID3.Album = Register.Offset(0, 5).Value
ID3.Title = Left(Register.Offset(0, 2).Value, (Len(Register.Offset(0, 2).Value) - 4))
ID3.LeadArtist = Register.Offset(0, 4).Value
ID3.TrackPosition = Register.Offset(0, 3).Value
ID3.SaveToFile Register.Value
Next Register
End Sub
Yesterday after several attempts, the method SaveToFile stopped working, even restarting the machine.
Thanks in advance!
Hope that everything is doing well with everybody.
I got from internet a simple and functional code to update MP3 tags by loading the extension cddbcontrol.dll. The problem is that the Excel always stops responding after some time of execution. I separated all my files in lots of 800. I could update the first one successfully, but now even with smaller lots, Excel suddenly stops responding and restarts.
Do you have an idea of what can cause this? This is the code:
Sub Updater()
Dim Register As Range
Dim ID3 As New CddbID3Tag
Set WorkArea = Plan1.Range(Cells(5, 1), Cells(Cells(Rows.Count, 1).End(xlUp).Row, 1))
RowCounter = Cells(Rows.Count, 1).End(xlUp).Row - 4
For Each Register In WorkArea
Counter = Counter + 1
Application.Wait Now + TimeValue("00:00:01")
Application.StatusBar = "Updating tags from file " & Counter & " of " & _
RowCounter & " | Progress : " & Format((Counter) / RowCounter, "Percent")
ID3.LoadFromFile Register.Value, False
ID3.Album = Register.Offset(0, 5).Value
ID3.Title = Left(Register.Offset(0, 2).Value, (Len(Register.Offset(0, 2).Value) - 4))
ID3.LeadArtist = Register.Offset(0, 4).Value
ID3.TrackPosition = Register.Offset(0, 3).Value
ID3.SaveToFile Register.Value
Next Register
End Sub
Yesterday after several attempts, the method SaveToFile stopped working, even restarting the machine.
Thanks in advance!