Im still with Excel (VBA) macros and trying to find a way of inputting data from a html sheet (stored on the local machine) into the Excel sheet for manipulation of the stuff in the html. The problem is I need to access the latest file which is a product of the date (in yymmdd format) and some text . What I need to do is find a way of telling Excel which file to pull.
an example of what I have and works (but I have to change the macro every time I run it to get the file date right) is here ...
Sheets("my data").Select With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\myFiles\150805_final.html", Destination:=Range( "$A$1")) .Name = "150805_final_1" End sub
Appologies for not getting back sooner, but holidays got in the way of work and a myriad of other joyous things.
At first glance your script seems to work, but there are a few other problems. I think this is because I have forgotten to add a thing in another part of my script which copies cells from one sheet to another. This would tells me things are working as I want them to or not. However, your addition does seem to let me past the initial failings and faults I was experiencing.
I will hopefully be able to mark this as SOLVED later today (but more likely tomorrow) when I have trawled through the rest of the script to see that everything else does work :^)
Thanks again for your help - it is very much appreciated.