If your screen on events always trigger when the screen is on and your screen off events always fire when the screen is off. You, can set a global variable and in each event of screen on and screen off, set this variable:
Example:
Sub Globals
Dim scrvar As Boolean
End Sub
Sub ScreenOn
scrvar = True
'your other code
End Sub
Sub ScreenOff
scrvar = False
'you other code
End Sub