View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Quitting a BeforeSave event procedure without saving.

Hi
add the line
Cancel = True


--
Regards
Frank Kabel
Frankfurt, Germany
"Richard Buttrey" schrieb im Newsbeitrag
m...
In a Workbook BeforeSave procedure, I've got a Message box to which I
expect a Yes/No response.

If the answer is No then I want to simply quit the procedure without
the workbook saving. It seems that whether the answer is Yes or No,
the procedure continues to the end and saves the workbook.

I've tried putting an Exit Sub, or End command after the test but to
no avail.

Can anyone help me out please.

Usual TIA

Rgds,

Richard Buttrey