Hi Christopher
One way would be to do something like this.
'Module level variable
Public bClose As Boolean
'Procedure in the "ThisWorkbook" module
Public Sub Workbook_BeforeClose(Cancel As Boolean)
If bClose = False Then
Cancel = True
UserForm1.Show
Else
Cancel = False
End If
End Sub
'Procedure in UserForm to finally close
Private Sub CommandButton1_Click()
bClose = True
Application.Quit
End Sub
Or you could do something similar in the Auto_Close procedure.
Right click on the excel icon to the left of file and chose view code and paste in the following
Private Sub Workbook_BeforeClose()
UserForm1.Show
End Sub
steve