Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to delete multiple files?
Hi to all,
Could anyone please tell me as to why the following code won't work? Sub LargoFiles() Dim lRow As Long Dim i As Long Dim myFName As String With ActiveSheet lRow = .Cells(.Rows.Count, "A").End(xlUp).Row End With On Error Resume Next For i = 3 To lRow If Cells(i, 1).Value = "x" Then myFName = Cells(i, 2).Value Kill myFName ' delete files specified with an x RmDir Cells(i, 1).Value 'delete the folder also if it's empty Cells(i, 1).Value = "Deleted" 'mark row as deleted End If Next i On Error GoTo 0 End Sub Would appreciate any help provided, Adnan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to delete archived tmp files | Excel Discussion (Misc queries) | |||
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents | Excel Discussion (Misc queries) | |||
Excel will not delete the tmp files. | Excel Discussion (Misc queries) | |||
view multiple files in multiple windows on multiple screens. | Excel Discussion (Misc queries) | |||
How can I view files chronologically when opening multiple files | Excel Discussion (Misc queries) |