Hello,
I am looking for some code that will do the following. When the macro is run it will pull only the first column from a text file (path is C:\Users\jmckibb\Desktop\My Stuff\text.txt) and create a variable (if that is the right terminology) that is the first column with a comma behind every row except the last.
For example:
The test file is like so...
<tbody>
</tbody>
When the macro is run I need it to bring back the following and name it "List"
List = "Dog, Cat, Bird, Snake"
It is important that commas are behind each one except the last as I will be using this List to go into SQL and pull further data.
Any help appreciated.
I am looking for some code that will do the following. When the macro is run it will pull only the first column from a text file (path is C:\Users\jmckibb\Desktop\My Stuff\text.txt) and create a variable (if that is the right terminology) that is the first column with a comma behind every row except the last.
For example:
The test file is like so...
Dog | Grey | 01/02/19 |
Cat | Green | 01/02/19 |
Bird | Pink | 01/02/19 |
Snake | Green | 01/02/19 |
<tbody>
</tbody>
When the macro is run I need it to bring back the following and name it "List"
List = "Dog, Cat, Bird, Snake"
It is important that commas are behind each one except the last as I will be using this List to go into SQL and pull further data.
Any help appreciated.