View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] s_smith_iet@hotmail.com is offline
external usenet poster
 
Posts: 66
Default run time error 53

Do
ChDir "C:\Documents and Settings\Owner\Desktop\Data log trending
Version 2.0"


Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("C:\Documents and Settings\Owner\Desktop
\Data log trending Version 2.0\Data log files (by machine)\P124\TXT")
Set tmp = Workbooks.Add
Set myfiles = f.Files
counter = 1
For Each fc In myfiles
tmp.Sheets(1).Cells(counter, 1).Value = fc.Name
tmp.Sheets(1).Cells(counter, 2).Value = fc.datelastmodified
counter = counter + 1
Next
tmp.Sheets(1).Columns("B:B").EntireColumn.AutoFit
tmp.Sheets(1).Range(Selection, Selection.End(xlToRight)).Select
tmp.Sheets(1).Range(Selection, Selection.End(xlDown)).Select
Set sortrange = Selection


For Count = 1 To 1


Set f2 = fso.GetFile("C:\Documents and Settings\Owner\Desktop
\Data log trending Version 2.0\Data log files (by machine)\P124\TXT
\" <-------------------------------------
& tmp.Sheets(1).Cells(Count, 1).Value)

__________________________________________________ _____________________________________


This is where I get the error