lock excel worksheet when loosing focus
Excel cannot you this directly as there is no Application_LostFocus event.
You will have use some API calls within a Timer to see if Excel is the
ForeGround window.
NickHK
"Nader" wrote in message
...
Hello,
I would like to lock my excel worksheet as soon as I loose focus. An
exemple
: Let's I'm puting values into my sheet and then I decide to write a word
document. Once I clicked on "Start" (Programs-etc...), I want my excel to
lock itself and then if I go back to my excel sheet I will be asked for a
password.
Is there a lost focus on worksheet method in excel vba ?
Thanks in advance
Nader
PS : all this is to avoid to put in value by mistake in my excel sheet
|