In order for you to detech when any of the opened wks is activated,you must create a application class event and put the code in thatclass' event handler....That way when you switch between the wk's thecode will still work.