Justin,
Try using the following in a .CSV
"john Doe","Seattle, Washington", "Analyst", "Doe, John"
"mary Doe","Bellevue, Washington", "CEO", "Doe, Mary"
I tried your above solution as I stated before and got an error. It cannot determine the correct delimiter and it returns with an error, "SELECT * FROM CSVfile"
That's why I decided to write my own code. BTW, here is the correct code. I had an error on my previously published one.
================================
Dim ColName, DataArray(100)
dqt = chr(34) ' Double quote
Set CSVtmp = fs

penTextFile( CSVFile)
Do While CSVtmp.AtEndOfStream = FALSE
Txt = CSVtmp.ReadLine
' This is the HEADER LINE
If instr(1, txt, "Display Name", 1) > 0 then
ColName = split(Txt, ",")
For i = 0 to Ubound(ColName) - 1
ColName(i) = trim (replace( ColName(i), dqt, "") )
Next
Elseif trim(txt) = "" then
' Do Nothing
Else
StrTmp = Txt
Start = 1
ArrayCount = 0
'
' Parse the line
' Locate the double quotes
Do While strTmp <> ""
Nchar = len(StrTmp)
pos1 = instr(start, strTmp, dqt, 1)
'
' This is the string after the first double quote
NxtStr = right(strTmp, nchar-pos1)
'
' Next position of double quote
pos2 = instr(1, NxtStr, dqt, 1)
strData = left(NxtStr, pos2 - 1 )
DataArray(ArrayCount) = strData
'
lchar = len(NxtStr)
' Last double quote means it is at the end of the line
If pos2 = lchar then
exit do
End If
strTMP = right(NxtStr, lchar - pos2-1)
ArrayCount = ArrayCount + 1
Loop
End If
Loop
CSVtmp.close