Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
kill command and excel charles Excel Discussion (Misc queries) 7 August 30th 09 04:02 PM
Kill Macro Jeff Excel Discussion (Misc queries) 4 September 27th 06 04:33 PM
On time kill Antonio Excel Discussion (Misc queries) 4 June 8th 06 10:50 AM
kill worksheets portroe Excel Programming 2 January 25th 04 11:11 PM
AutoFill KILL Frustrated[_2_] Excel Programming 1 July 29th 03 04:40 PM


All times are GMT +1. The time now is 09:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"