View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jacqui Jacqui is offline
external usenet poster
 
Posts: 18
Default How to ensure a VBA sub is run before closing a workbook

What syntax would I use to make sure specific subs are run before Excel
closes the active workbook. These subs are error checks and I need VBA to
vet the data and alert the user there are errors before the workbook is
closed. Is it the Workbook_Before Close event?. I tried adding the syntax
below but it didn't trigger the subs. Also would an On Save type event (if
there is one) be a better alternative. Can anyone recommend a solution with
some code please.
Many thanks
Jacqui

Private Sub Workbook_BeforeClose()

Qualifiers_Check
Disable_Check

End Sub