With the following code, the function only msgbox's "variable declaration" and "before for/each". i put them in there for debugging when i saw that my function wasn't getting all the way through.
Function ArrToCSV(ByVal array)
msgbox "variable declaration"
strQuote = Chr(34)
msgbox "before for/each"
For each x in array
strTemp = strTemp & strQuote & x & strQuote & vbcrlf
msgbox "after for/each"
Set ArrToCSV = strTemp
Not quite sure what you are trying to accomplish but...
MsgBox Join(MyArray, vbNewLine)
The second post was just stating taht i know for a fact that the data is in that array, because i can pick apart elements of it and look at them.
I'm trying to put an array into a readable csv format, but because some of the elements have double quotes in them, i cant just simply do a 'join'; i have to wrap the entire element in quotes, hense the Chr(34)'s
i still dont see anything wrong with the syntax of my loop or function.