PDA

View Full Version : kill wkb & close excel



av8tordude
04-24-2011, 01:51 PM
how can I self kill my workbook and close the excel application as well. I've tried this code, but it does not work.

Sub KillMe()
With ThisWorkbook
Call TitleBarOpen
.Saved = True
.ChangeFileAccess Mode:=xlReadOnly
Kill .FullName
.Close False
End With
With Application
.DisplayAlerts = False
.Quit
End With
End Sub

jrb
04-24-2011, 06:23 PM
Maybe this answered your question

http://www.mrexcel.com/forum/showthread.php?t=545790&highlight=kill+wkb

Aussiebear
04-25-2011, 01:16 AM
how can I self kill my workbook and close the excel application as well. I've tried this code, but it does not work.

Lets see if you haven't killed off a few helpful friends here with the cross posting....

What does it take to get the message across to you people, if you feel the need to cross post then also paste the link. Cross posting suggests that you don't value the assistance being freely given here.