Date Created

Move Oldest File – Excel VBA

Move Oldest File – Excel VBA Sub Move_Oldest_File() Dim objFSO Dim objFolder Dim colFiles Dim dtmOldestDate Dim from_path, to_path, backup_path from_path =”C:\Users\Admin\Desktop\TEST\OLD FILES”  to_path = “C:\Users\Admin\Desktop\TEST\NEW FILES” backup_path = “C:\Users\Admin\Desktop\TEST\BACKUP FILES”  DirFile = to_path & “\NEWNAME.xlsx” If Len(Dir(DirFile)) <> 0 Then ‘SetAttr DirFile, vbNormal GoTo Skip End If On Error GoTo Skip Set objFSO...