I've got a logging program which I've purchased logging to a .log file which is really a .csv text file. Every 10 seconds this logging app adds a new row to the .log text file with the last snap shot of data from a PLC. I've recorded a macro to import this .log file into a excel sheet (see the code for this is below). This works ok and I get all the data from the .log file into my excel sheet. What I really want to do is to only import the last row of the .log file. Is there an easy way of modifying the code below to do this. Is there a way of couting the rows in this file before running the query and then using this value as the .TextFileStartRow property.
Thanks in advance for any help given.
' Get_Todays_Log Macro
' Macro recorded 01/10/2005 by R Goforth