The 'OnOpen' event happens when the entire QVW is opened, it does not occur when moving from sheet to sheet.
In the properties of the sheet itself, you may add a trigger which can change this variable's value when you change sheets, the event is 'OnActivateSheet'.