You have defined Names field:
Dim names(5) As String

but you loop from 0 to 5, that means Names field must be defined as:
Dim names(6) As String

Check also other fields.