Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to quit in BeforeClose
Hi.
(Excel 2010) I need to check if the user has changed the name at the actual sheet before the workbook is closed. In my sub Workbook_BeforeClose(Cancel As Boolean) I have a YesNo box. The intention is, that if the user select No the workbook shall remain open, e.g. the sub shall not be executed. How do I do ? Regards Peter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to quit in BeforeClose
On Jul 14, 7:49*am, Peter wrote:
Hi. (Excel 2010) I need to check if the user has changed the name at the actual sheet before the workbook is closed. In my sub Workbook_BeforeClose(Cancel As Boolean) I have a YesNo box. The intention is, that if the user select No the workbook shall remain open, e.g. the sub shall not be executed. How do I do ? Regards Peter As ALWAYS, post your efforts for comments and suggestions. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to quit in BeforeClose
Hi.
I did find a way: Sub Workbook_BeforeClose(Cancel As Boolean) a = MsgBox("Fik du rettet navnet på det nye ark ?", vbYesNo) If a = vbNo Then Cancel = True end sub Thank you Peter |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to quit in BeforeClose
Peter expressed precisely :
Hi. I did find a way: Sub Workbook_BeforeClose(Cancel As Boolean) a = MsgBox("Fik du rettet navnet på det nye ark ?", vbYesNo) If a = vbNo Then Cancel = True end sub Thank you Peter Congratulations!!! That's exactly how it's done... -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
beforeclose | Excel Programming | |||
EnableEvents BeforeClose | Excel Programming | |||
BeforeClose Problem | Excel Programming | |||
vba advice how 2get a input box to quit by entering the word quit+ 4 a msgbox to disp | Excel Programming | |||
BeforeClose vs Auto_Close | Excel Programming |