Sub btnExport_Click
Dim Hdr As List
Hdr.Initialize 'if this and the next line are used to create the CSV header, the above error occurs
Hdr.Add(Array As String("ID","Title","Description","DateAdded","BaseURL","URL","Active","FileFound"))
' If the above 2 lines are not used and this line is used to create the header, no error occurs
'Hdr.Initialize2(Array As String("ID","Title","Description","DateAdded","BaseURL","URL","Active","FileFound"))
Dim FN As String = txtFilename.Text
Dim su As StringUtils
Dim DocItems As List = Main.tvDocs.Items
su.SaveCSV2("", FN, ",", DocItems, Hdr)
End Sub