View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Striker Striker is offline
external usenet poster
 
Posts: 55
Default Copy CSV to variables

I have been using Excel VBA to open a CSV file, find the last row, and copy
data to an excel file. Once in the excel file using the .offset, I assign
the cell values to a variable. Now that I have populated variables, I do an
insert query against a SQL table. This works fine, but obviously I need to
streamline the process. I would like to simply copy the values from the CSV
directly into my variables, but not sure how to do it?

Say the CSV file has 3 values separated by commas JIM,SMITH,1012223333 and I
want to copy them to Variables with the names FNAME LNAME PHONE.

Obviously I need to find the last row with data in it, and do a loop.



Thanks for any suggestions.