Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill Command
Hi all,
Very quick one for you, Any body able to tell me why the below doesn't work. If I run the Kil line by itself then its fine. Windows("Collection Note.xls").Activate ActiveWindow.Close Kill "G:\EXCELDOC\Returns Check\Collection Note.xls" Hope someone can help/ Many Thanks -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill Command
Jamie,
If this code is in "Collection Notes.xls", by closing that window you will stop the execution of the code, before the Kill can operate. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "JamieD " wrote in message ... Hi all, Very quick one for you, Any body able to tell me why the below doesn't work. If I run the Kill line by itself then its fine. Windows("Collection Note.xls").Activate ActiveWindow.Close Kill "G:\EXCELDOC\Returns Check\Collection Note.xls" Hope someone can help/ Many Thanks J --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill Command
Not sure why, think it is because Excel might remember the
workbook name, but have experienced this myself. Would suggest that the active window.close statement, you activate another workbook so Excel has that as the live name in it's memory, and then try to kill the other wb. HTH -----Original Message----- Hi all, Very quick one for you, Any body able to tell me why the below doesn't work. If I run the Kill line by itself then its fine. Windows("Collection Note.xls").Activate ActiveWindow.Close Kill "G:\EXCELDOC\Returns Check\Collection Note.xls" Hope someone can help/ Many Thanks J --- Message posted from http://www.ExcelForum.com/ . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Kill Command
Is the code in the workbook "Collection Note.xls" ?
If so, once you close it (which you do in the second line) the code stops executing. -- Regards, Tom Ogilvy "JamieD " wrote in message ... Hi all, Very quick one for you, Any body able to tell me why the below doesn't work. If I run the Kill line by itself then its fine. Windows("Collection Note.xls").Activate ActiveWindow.Close Kill "G:\EXCELDOC\Returns Check\Collection Note.xls" Hope someone can help/ Many Thanks J --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
kill command and excel | Excel Discussion (Misc queries) | |||
Kill Macro | Excel Discussion (Misc queries) | |||
On time kill | Excel Discussion (Misc queries) | |||
kill worksheets | Excel Programming | |||
AutoFill KILL | Excel Programming |