+ Reply to Thread
Results 1 to 2 of 2

Automation Error Crashing Excel

Hybrid View

  1. #1
    Registered User
    Join Date
    05-20-2010
    Location
    California
    MS-Off Ver
    Excel 2007/2010
    Posts
    9

    Automation Error Crashing Excel

    I've been working on writing an Excel file that will read the music files from a folder path and will display the ID3 properties, then allow you to modify/save your changes. The code for gathering the data works great, however, the updating code seems to cause a random Automation Error that crashes Excel and doesn't allow me to retrieve an error code. I've narrowed it down to the section where it loads/saves the ID3 properties, but I can't seem to track it down. I've attached the file below for reference, but here's the section of code of updating:

    Do
        strNewFileName = strPath & "\" & Cells(intRow, intSongNumCol).Value & " - " & Cells(intRow, intTitleCol).Value & Cells(intRow, intFileTypeCol).Value
        If Cells(intRow, intCol).Value <> strNewFileName Then
            Name Cells(intRow, intCol).Value As strNewFileName
        End If
        Cells(intRow, intCol).Value = strNewFileName
        id3.LoadFromFile Cells(intRow, intCol).Value, False
        'id3.Title = Cells(intRow, intTitleCol).Value
        'id3.Album = Cells(intRow, intAlbumCol).Value
        'id3.TrackPosition = Cells(intRow, intSongNumCol).Value
        'id3.LeadArtist = Cells(intRow, intArtistCol).Value
        'id3.Genre = Cells(intRow, intGenreCol).Value
        'id3.Year = Cells(intRow, intYearCol).Value
        id3.SaveToFile Cells(intRow, intCol).Value
        Cells(intRow, 10).Value = "Complete"
        intRow = intRow + 1
        'Sleep 500
        Set id3 = Nothing
    Loop Until Cells(intRow, intCol).Value = ""
    Any assistance that you guys can provide would be great! Thank you very much in advance!Test2.xlsm

  2. #2
    Registered User
    Join Date
    05-20-2010
    Location
    California
    MS-Off Ver
    Excel 2007/2010
    Posts
    9

    Re: Automation Error Crashing Excel

    To add a little more, I was trying this on about 58 songs, and it would randomly crash on different rows, but then it wouldn't crash on those rows a second time. So once it crashed on say the 5th song, it wouldn't crash until at least the 6th song the next time I ran it.

    Edit: If I leave the actual changes commented out, then it does only do the songs once. Once I allow the actual property changes, it crashes very often.
    Last edited by jwnwrestler171; 08-03-2012 at 11:46 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1