Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a file which I've listed paths of files in column "C". I need to
cycle through column C and delete the file if it exists, do nothing if it doesn't exist. TIA! -Mike *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range, cell as Range
set rng = range(cells(1,3),cells(1,3).end(xldown)) for each cell in rng if dir(cell) < "" then kill cell end if Next -- Regards, Tom Ogilvy "Michael Smith" wrote in message ... I have a file which I've listed paths of files in column "C". I need to cycle through column C and delete the file if it exists, do nothing if it doesn't exist. TIA! -Mike *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Error Resume Next
For i = 1 To Cells(Rows.Count,"C").End(xlUp).Row Kill Cells(i,"C") Next i On Error Goto 0 -- HTH Bob Phillips "Michael Smith" wrote in message ... I have a file which I've listed paths of files in column "C". I need to cycle through column C and delete the file if it exists, do nothing if it doesn't exist. TIA! -Mike *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks...both work perfect. I appreciate it immensly.
-Mike *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
File Exists | Excel Discussion (Misc queries) | |||
File Exists | Excel Programming | |||
IF File Exists | Excel Programming | |||
File already exists | Excel Programming | |||
the file already exists - do you want to replace the existing file? | Excel Programming |