Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello:
I have a auto_close routine in my VBA project that initiates when the user tries to close the file either intentionaly or by accident. If the closure is accidental I would like to cancel file closure. Is there an easy way to do this? here is the current code: Sub auto_close() 'Declare variables Dim intResponse As Integer Dim strDatestamp, strPath As String 'Check to confirm file exit intResponse = MsgBox("Are you sure you wish to Exit?", vbYesNo) If intResponse = 6 Then ThisWorkbook.SaveAs Filename:=ABC.xls else '?????? CANCEL CLOSURE] end if end sub Your help is appreciated. Thanks, -Neil |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Starting Auto_Close macro based on an IF statement | Excel Discussion (Misc queries) | |||
unable to close macro using auto_close or application.quit | Excel Programming | |||
BeforeClose, Auto_Close, and ActiveX Server | Excel Programming | |||
Auto_Close() needs help | Excel Programming | |||
Auto_Close | Excel Programming |