You're welcome!
Stay safe!
Cheers,
You're welcome!
Stay safe!
Cheers,
The code that @Gicu gave me is working great. However, I think that before I uploaded the sample data, I may have inadvertently reformatted it slightly. The sample data works fine, but all of the other csv files have quotes around the text fields when imported into my Access table. Is there a way to address that in the code?
Try this:
'MyArray = Split(strLine, ",") 'Comment out this line and replace it with the following
MyArray = Replace(Split(strLine, ","),Chr34,"")
Cheers,
Vlad
Except need parens for Chr function:
Chr(34)
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thanks June, still in bed.....
Thank you both for the quick response. I made the change, but now it's giving me the following error message: Run-time error "13": Type mismatch
The new line is highlighted:
MyArray = Replace(Split(strLine, ","), Chr(34), "")
Any ideas?
Try replacing then splitting.
MyArray = Split(Replace(strLine, Chr(34), "") ",")
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
That did the trick! You are both saving me SO much time each month. I really appreciate it. I will probably have questions on a few other things I'm trying to automate.
Stay safe and healthy! Thanks again!