I have an EXCEL pgm(w/VBA) when EXITing from it,
either by selecting EXIT command from the command bar
OR by selecting the red [X] button upper right corner.
The EXCEL pgm prompts the user for a password.
Why is the EXCEL pgm prompting the user for a password ?
The EXCEL pgm has a password set for each sheet within it, and
also the password is set in the VBA properties of the EXCEL project.
The password is not set for the workbook though.
When EXITing, the EXCEL pgm goes into a subroutine
In this subroutine, I do:
... Application.DisplayAlerts = FALSE
... Application.ActiveWorkbook.Saved = TRUE
If there is only instance of EXCEL, then I do
If Workbooks.Count = 1 Then
Application.Quit
Else
Application.Close( 0 )
End if