BASIC+Calc: Setting OnDoubleClick does not work

From this question, DoubleClick on cell A1, it behaves as initial Edit mode and does not call sub test.
What should be added more?

Test4DoubleClickOnACell.ods

image description

Hello,

I’ve downloaded your test file and it works as designed. It seems that you did not run the macro Macro once, before you check “double click” working. Assume Macro as the “event (re-)definition” what to do OnDoubleClick. In other words: You need to execute the macro Macro once, if opening the document (or at least once before you expect double click to call sub test).

Check the following slight modification of your sample file, which assigns macro Macro to Event Document loading finished through Tools -> Customize...-> Tab: Events (see screenshot)

TestDoubleClick.ods

If you open that modified version, macro Macro will be called and a subsequent double click anywhere in Sheet pops up your message box.

Hope that helps.

Dear @anon73440385,

Thank you so much.

After running macro, namely Macro and saving this file, DoubleClick stays with Sheet2 yet when this file is open.

And sorry asking via this comment, why does macro, namely Macro not appear in Events panel ?

why does maro, namely Macro not appear in Events panel ?

I have manually added this in my sample file to be started on opening the document (so redefinition of OnDoubleClick is immediately available, when the document has been loaded) . It doesn’t add there automatically. The event here is Document loading finshed and this starts Marcro once, while macro Macro redefines another event called OnDoubleClick but macro Macro doesn’t modify / custimize event Document loading finished.

In other words: “Bootstraping” needs to have a starting point, which is to manually customize the event Document loading finshed

Dear @anon73440385,

Thank you so much again for your explanation.