@Rob123: you'd probably be better using Trim$ for that line:
VB Code:
  1. If Len(Trim$(Data)) = 0 Then Exit Do