Maybe someone can help me out with this. I've successfully made an MP3 ID3v1.1 tag editor that will be used as part of one of my projects. I'm having one problem that needs to be resolved though. The user will choose a genre from a combobox. There is an array in the form load event that holds all of the genre names. When the tag is written, the genre name in the combobox is converted to the index # in the array for that genre. The problem is that I can't get it to work correctly in the conversion process. Here's my code below. Any help with this is extremely appreciated as this is the last bug I have to work out.

VB Code:
  1. Private Sub Form_Load()
  2. Dim i
  3. Matrix = Array("Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", _
  4.             "Hip -Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&b", "Rap", "Reggae", _
  5.             "Rock", "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks", _
  6.             "Soundtrack", "Euro -Techno", "Ambient", "Trip -Hop", "Vocal", "Jazz Funk", "Fusion", _
  7.             "Trance", "Classical", "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", _
  8.             "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", _
  9.             "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno -Industrial", "Electronic", _
  10.             "Pop -Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", _
  11.             "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", _
  12.             "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo -Fi", "Tribal", "Acid Punk", "Acid Jazz", _
  13.             "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk", _
  14.             "Swing", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", _
  15.             "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band", "Chorus", _
  16.             "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", _
  17.             "Symphony", "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", "Folklore")
  18.  
  19. For i = 0 To UBound(Matrix)
  20.         combogenrefield.AddItem Matrix(i)
  21. Next i
  22. End Sub
VB Code:
  1. ........
  2. temp = RTrim(.Genre)         'read genre character to "temp"
  3.         txtCombo.Text = Asc(temp)          'convert chr-code to ASCII-number
  4.         comboGenrefield.ListIndex = txtCombo.Text - 1

From what I've seen, the number is correct, but the Name of the genre is not.