Hi All, I started writing code as follows (adapted from here):
[vba]Option Explicit
Sub test()
Dim fn As String, temp As String, i As Long, r As Range
fn = ThisWorkbook.Worksheets("IMPORTLOG").Range("IMPORTLogName").Value '<- file path for LOG
Debug.Print fn
temp = CreateObject("Scripting.FileSystemObject").OpenTextFile(fn).ReadAll
ThisWorkbook.Worksheets("IMPORTLOG").Range("A1").Value = temp
End Sub[/vba]
But this is causing a "Runtime error 76: path not found" error in the line:
temp = CreateObject("Scripting.FileSystemObject").OpenTextFile(fn).ReadAll
Any ideas why this is not working.
I have reattached my workbook with the above code and the LOG file (which should be saved in the folder as specified in the worksheet for the purposes of the above code).
Any help is apprecaited.