Wij hebben voor iedere dag van de week een blanco rapport dat we telkens apart opslaan.
Deze messageboxen herinneren de mensen eraan wat iemand moet doen. Dit werkt perfect
Echter opent excel telkens als een uur eraan komt (zie onderaan bij sub workbook_open () )alle rapporten van maandag tot zondag wat niet echt het geval moet zijn.
De messageboxen moeten alleen opkomen bij het openstaand rapport en er mag geen ander rapport geopend worden. Hoe moet ik de code dan veranderen.
Deze messageboxen herinneren de mensen eraan wat iemand moet doen. Dit werkt perfect
Echter opent excel telkens als een uur eraan komt (zie onderaan bij sub workbook_open () )alle rapporten van maandag tot zondag wat niet echt het geval moet zijn.
De messageboxen moeten alleen opkomen bij het openstaand rapport en er mag geen ander rapport geopend worden. Hoe moet ik de code dan veranderen.
Code:
Sub open_night_doors_main_entrance()
MsgBox "Activate nachtdeuren", vbInformation, "open night doors main entrance"
End Sub
Sub open_main_gates()
MsgBox "unlock 'MAINGATE IN', 'MAINGATE VISITOR IN' & 'MAINGATE OUT'", vbInformation, "open main gates"
End Sub
Sub Empty_letter_box()
MsgBox "Check letter box at MAINGATE VISITOR IN", vbInformation, "Empty letter box"
End Sub
Sub Bring_newspapers_to_vip_office()
MsgBox "Bring newspapers to 'VIP OFFICE 1ST FLOOR NORTH'", vbInformation, "Bring newspapers to VIP office"
End Sub
Sub Switch_on_plasma_screen()
MsgBox "Switch on plasma screen", vbInformation, "Switch on plasma screen hybrid synergy drive display"
End Sub
Sub Switch_off_plasma_screen()
MsgBox "Notify reception to switch off plasma screen", vbExclamation, "Switch off plasma screen hybrid synergy drive display"
End Sub
Sub Check_outside_gates_doors_TASC()
MsgBox "Check TASC building with cameras and put status on OK or NOT OK", vbInformation, "Check outside gates/doors TASC"
End Sub
Sub Switch_off_lights_reception_area()
MsgBox "Switch off all the lights with the buttons located on the switchboard", vbExclamation, "Switch off lights reception area"
End Sub
Sub close_main_gates()
MsgBox "Put MAINGATE IN, MAINGATE VISITOR IN & MAINGATE OUT on card only", vbInformation, "close main gates"
End Sub
Sub close_night_doors_main_entrance()
MsgBox "Deactivate nachtdeuren", vbInformation, "close night doors main entrance"
End Sub
Sub Workbook_open()
Application.OnTime TimeValue("05:00:00"), "open_night_doors_main_entrance"
Application.OnTime TimeValue("06:15:00"), "open_main_gates"
Application.OnTime TimeValue("06:30:00"), "Empty_letter_box"
Application.OnTime TimeValue("06:45:00"), "Bring_newspapers_to_vip_office"
Application.OnTime TimeValue("09:00:00"), "Switch_on_plasma_screen"
Application.OnTime TimeValue("17:00:00"), "Switch_off_plasma_screen"
Application.OnTime TimeValue("20:00:00"), "Check_outside_gates_doors_TASC"
Application.OnTime TimeValue("20:15:00"), "Switch_off_lights_reception_area"
Application.OnTime TimeValue("21:00:00"), "close_main_gates"
Application.OnTime TimeValue("23:00:00"), "close_night_doors_main_entrance"
End Sub