Macro does not trigger automatically

While trying to automate one cell (here D15) the macro does not run automatically.
The cell value should not be a negative value.
The cell value is computed from other cells automatically based on an equation
when changed to a negative value my macro should trigger and the causing cell values should be made to the default value of zero with a warning message

The macro and the file as such is attached herewith

Please help me

I am using Ubuntu 10.4 with LiberOffice 4.0

Rasheed

How to add attachment pl…

Press Ctrl+F while edit your message

Bug fdo#63984 appears to have been raised as a result of lack of response less than 24 hours after this question was asked. Three days after that the OP asked the same question over on the AOO forums, where a solution was provided, which I am going to repeat here for simplicity:

I ran your macro that creates the Listener and then modified one of the input cell for D15 and the macro worked. I do not see any automatic running of the Listener creation when the document is opened, so I think you have to add that. […] Go to the menu Tools → Customize and then select the Events tab. Click on Open Document in the list of events and then click on the Macro button. After a few seconds a Macro Selector dialog will open. Your document should appear in the list of Libraries on the left. Click on its + sign, choose the library and then select the macro that creates the listener from the list on the right. Click Ok to close all the dialogs. Save the document and close it. The next time you open the document the listener should load automatically. (courtesy @FJCC over at the AOO forum, to whom the credit for this answer belongs)