or using strings instead of integers:

vb Code:
  1. Dim queryAppointments() As String = (From line In IO.File.ReadAllLines("Justices.txt") _
  2.                            Where Not line.Trim = "" _
  3.                            Let fields = line.Split(","c) _
  4.                            Select fields(4)).ToArray
  5.  
  6. Dim queryNoAppointments() As String = Enumerable.Range(1789, 221).Select(Function(i) i.ToString).Except(queryAppointments).ToArray
  7. IO.File.WriteAllLines("filename", queryNoAppointments)