Need VB formula to exit workbook

  • Thread starter Thread starter dave
  • Start date Start date
D

dave

Hello,

I need a VB formula to exit workbook. When pressed to close button on
the form, I want the whole workbook saved and closed. Please help

Thanks

Dave
 
VBA does not deal in formulas. I think you need a macro.

Sub closer()
Application.DisplayAlerts = False
With ActiveWorkbook
.Save
.Close
End With
Application.DisplayAlerts = True
End Sub


Gord
 
Back
Top