How to handle OnSelect event on sheet ?

Bernard Marcelly <[email protected]> Tue, 25 Jan 2011 20:59:13 +0100
Newsgroups gmane.comp.openoffice.devel.api
Message-ID <[email protected]>
Hi,
I am trying to attach a macro to the sheet events available in OOo 3.3 (by a 
right-click on the sheet tab).

With the OnSelect event, if the called macro displays a message you go into an 
endless loop because, once the message appears, the slightest move of the mouse 
changes the selection (all buttons released) - and calls again the macro !
I don't know how to avoid this. I feel there is a design problem here. The 
selection should not change when no mouse button is pressed.
Tested on RC9 with Windows XP.

Example of macro:

Sub handleEvent(zone As Object)
   MsgBox("Hey!")
End Sub

Regards
   Bernard