Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this one
Sub Deletes() dim strFN as string strFN = "C:\" & ActiveWorkbook .Worksheets("Sheet1").Range("B11").Value & ".xls" Kill strFN End Sub "Richard" wrote: I tried what you suggested, however still being a novice, I am making some error, the following is my code: Sub Deletes() ' ' Delete Macro ' Macro recorded 8/22/2006 by RSabbara ' ' Kill Path = "C:" With ActiveWorkbook Workbooks.Open Filename:=Path & .Worksheets("Sheet1").Range("B11").Value & ".xls" End Sub What am I missing? Thank you. Richard "Muhammed Rafeek M" wrote: ' Assume TESTFILE is a file containing some data. Kill "TestFile" ' Delete file. ' Delete all *.TXT files in current directory. Kill "*.TXT" "Richard" wrote: I have a spreadsheet with the pathname of the files that I want deleted, anyway to do this in a macro? So much of what I have done is already automated, this is one of the final steps in this project. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel file locked and cannot delete file | Excel Discussion (Misc queries) | |||
how do i delete a file from recent documents file in excel | New Users to Excel | |||
excel file deleted. Now howdo you delete file NAME | New Users to Excel | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming |