ObjFile

Delete file from a folder – Excel VBA

Delete file from a folder – Excel VBA Sub Delete_Newfile() to_path = “C:\Users\Admin\Desktop\TEST\NEW FILES” DirFile = to_path & “\NEWNAME.xlsx” If Len(Dir(DirFile)) <> 0 Then SetAttr DirFile, vbNormal On Error Resume Next Kill DirFile On Error GoTo 0 End If End Sub

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...

Published On

December 2018
M T W T F S S
« Nov    
 12
3456789
10111213141516
17181920212223
24252627282930
31