Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill command using &
The following code works fine.
Kill FileNameZip2 Kill FileNameZip3 Would the following code do the same? Kill FileNameZip2 & FileNameZip3 Thanks, Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill command using &
Have you try it ?
Answer is No If you want to delete all files in a folder you can do this On Error Resume Next Kill "C:\folder\*.*" -- Regards Ron de Bruin http://www.rondebruin.nl "PCLIVE" wrote in message ... The following code works fine. Kill FileNameZip2 Kill FileNameZip3 Would the following code do the same? Kill FileNameZip2 & FileNameZip3 Thanks, Paul |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill command using &
No, that would append the two filename strings into one. It would be the
same as doing Kill "C:\File1.txtC:\File2.txt" "PCLIVE" wrote: The following code works fine. Kill FileNameZip2 Kill FileNameZip3 Would the following code do the same? Kill FileNameZip2 & FileNameZip3 Thanks, Paul |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill command using &
Ok Ron,
Here's what I got. I need to kill one or two files based on an if statement. If L2 = "Jan", then I need to delete FileNameZip3. Else I need to delete two files, FileNameZip2 and FileNameZip3. How would I do this? If there is such thing as a block Else statement... If Sheets("Setup").Range("L2").Value = "Jan" _ Then Kill FileNameZip3 _ Else Kill FileNameZip2 Kill FileNameZip3 Thanks, Paul "Ron de Bruin" wrote in message ... Have you try it ? Answer is No If you want to delete all files in a folder you can do this On Error Resume Next Kill "C:\folder\*.*" -- Regards Ron de Bruin http://www.rondebruin.nl "PCLIVE" wrote in message ... The following code works fine. Kill FileNameZip2 Kill FileNameZip3 Would the following code do the same? Kill FileNameZip2 & FileNameZip3 Thanks, Paul |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill command using &
Try this
If Sheets("Setup").Range("L2").Value = "Jan" Then Kill FileNameZip3 Else Kill FileNameZip2 Kill FileNameZip3 End If -- Regards Ron de Bruin http://www.rondebruin.nl "PCLIVE" wrote in message ... Ok Ron, Here's what I got. I need to kill one or two files based on an if statement. If L2 = "Jan", then I need to delete FileNameZip3. Else I need to delete two files, FileNameZip2 and FileNameZip3. How would I do this? If there is such thing as a block Else statement... If Sheets("Setup").Range("L2").Value = "Jan" _ Then Kill FileNameZip3 _ Else Kill FileNameZip2 Kill FileNameZip3 Thanks, Paul "Ron de Bruin" wrote in message ... Have you try it ? Answer is No If you want to delete all files in a folder you can do this On Error Resume Next Kill "C:\folder\*.*" -- Regards Ron de Bruin http://www.rondebruin.nl "PCLIVE" wrote in message ... The following code works fine. Kill FileNameZip2 Kill FileNameZip3 Would the following code do the same? Kill FileNameZip2 & FileNameZip3 Thanks, Paul |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill command using &
That's it. Pretty simple, but my brain wasn't functioning.
Thanks for the help. Paul "Ron de Bruin" wrote in message ... Try this If Sheets("Setup").Range("L2").Value = "Jan" Then Kill FileNameZip3 Else Kill FileNameZip2 Kill FileNameZip3 End If -- Regards Ron de Bruin http://www.rondebruin.nl "PCLIVE" wrote in message ... Ok Ron, Here's what I got. I need to kill one or two files based on an if statement. If L2 = "Jan", then I need to delete FileNameZip3. Else I need to delete two files, FileNameZip2 and FileNameZip3. How would I do this? If there is such thing as a block Else statement... If Sheets("Setup").Range("L2").Value = "Jan" _ Then Kill FileNameZip3 _ Else Kill FileNameZip2 Kill FileNameZip3 Thanks, Paul "Ron de Bruin" wrote in message ... Have you try it ? Answer is No If you want to delete all files in a folder you can do this On Error Resume Next Kill "C:\folder\*.*" -- Regards Ron de Bruin http://www.rondebruin.nl "PCLIVE" wrote in message ... The following code works fine. Kill FileNameZip2 Kill FileNameZip3 Would the following code do the same? Kill FileNameZip2 & FileNameZip3 Thanks, Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
kill command and excel | Excel Discussion (Misc queries) | |||
Kill | Excel Programming | |||
'Kill' | Excel Programming | |||
Kill command not working | Excel Programming | |||
Kill Command | Excel Programming |