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...[TABLE="width: 500"]
<tbody>[TR]
[TD]Dog[/TD]
[TD]Grey[/TD]
[TD]01/02/19[/TD]
[/TR]
[TR]
[TD]Cat[/TD]
[TD]Green[/TD]
[TD]01/02/19[/TD]
[/TR]
[TR]
[TD]Bird[/TD]
[TD]Pink[/TD]
[TD]01/02/19[/TD]
[/TR]
[TR]
[TD]Snake[/TD]
[TD]Green[/TD]
[TD]01/02/19[/TD]
[/TR]
</tbody>[/TABLE]
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...[TABLE="width: 500"]
<tbody>[TR]
[TD]Dog[/TD]
[TD]Grey[/TD]
[TD]01/02/19[/TD]
[/TR]
[TR]
[TD]Cat[/TD]
[TD]Green[/TD]
[TD]01/02/19[/TD]
[/TR]
[TR]
[TD]Bird[/TD]
[TD]Pink[/TD]
[TD]01/02/19[/TD]
[/TR]
[TR]
[TD]Snake[/TD]
[TD]Green[/TD]
[TD]01/02/19[/TD]
[/TR]
</tbody>[/TABLE]
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.