I must do something wrong, but I really can’t find out what. I have an application that starts a quality quiz, that is, when started, a userform is used to guide the user through a questionnaire, a kind of quiz, allowing him/her to know how much he/she knows about quality, in general. To hide the Excel environment, I use a few statements in the Workbook_Open which I undo in the Workbook_BeforeClose event. The Workbook_BeforeClose event is triggered by ActiveWorkbook.Close which is apart from the unload me command, the only command executed when the OK button on the UserForm is clicked.
Private Sub CmdOK_Click() Unload Me ActiveWorkbook.Close End Sub
Private Sub Workbook_Open() ActiveWindow.DisplayGridlines = False Application.DisplayFullScreen = True UserForm1.Show End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWindow.DisplayGridlines = True Application.DisplayFullScreen = False Application.Quit End Sub
My problem is that when I start up Excel again after the quiz has been run, the DisplayFullScreen is still True, although I set it to false before quitting. The user should click the Close Fullscreen button before he has the normal situation again.
Does anyone know why this DisplayFullscreen is not reset?