Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you save it under a new name and just want to delete the old one, use
Kill oldFilepathandname If you want to delete the activeworkbook On Error GoTo ErrorHandler With ActiveWorkbook If .Path < "" Then .Saved = True .ChangeFileAccess xlReadOnly Kill ActiveWorkbook.FullName End If End With Exit Sub ErrorHandler: MsgBox "Fail to delete file: " & ActiveWorkbook.FullName Exit Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "funkymonkUK" wrote in message ... Hi I got a userform which askes the user to open up a file. i have stored the value as a string. is there a way I can delete that file? I have a workbook which is sent out to many users. I now want to produce an updated version and delete the old workbook. any ideas? -- funkymonkUK ------------------------------------------------------------------------ funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135 View this thread: http://www.excelforum.com/showthread...hreadid=512228 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting row using vb code? | Excel Discussion (Misc queries) | |||
VBA Code for Deleting a Row | Excel Worksheet Functions | |||
Deleting Code from VBA | Excel Discussion (Misc queries) | |||
Another code for deleting row | Excel Programming | |||
Deleting code in a file with code.. | Excel Programming |