Private Sub Workbook_BeforeClose(Cancel As Boolean)
'do your test and if true
Cancel = True
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Paul" <(E-Mail Removed)> wrote in message
news:73AC68EF-372C-4E05-B13C-(E-Mail Removed)...
> I have an auto close macro running on a file that demands certain cells
are
> complete before closing.
>
> Is there a way of stopping the close method within the auto close macro
when
> the data is not present.
|