We have to manage a spreadsheet that has a list box form included.
In the spreadsheet there are several cells that contain functions (that return values).
The event associated to the list box is a macro that adds some rows to the existing sheet.
We have verified that this macro doesn't work because of the presence of the functions (if we cancel the functions the macro works well).
Can someone help us? If you need more details please ask.
Thank you for help.
Michela e Roberto
Problems with macros when functions are present in cells
Re: Problems with macros when functions are present in cells
Use interface c.s.s.sheet.XCalculatable to turn off automatic calculation, let the form controls do whatever they are intended to do before you recalculate.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Problems with macros when functions are present in cells
Thanks Villeroy
we have already done this ...
we used:
before starting
ThisComponent.enableAutomaticCalculation(false)
and then (when the process is finished)
ThisComponent.enableAutomaticCalculation(true)
is it the same as
com.sun.star.sheet.XCalculatable?
or we have to write another instruction?
we have already done this ...
we used:
before starting
ThisComponent.enableAutomaticCalculation(false)
and then (when the process is finished)
ThisComponent.enableAutomaticCalculation(true)
is it the same as
com.sun.star.sheet.XCalculatable?
or we have to write another instruction?
Re: Problems with macros when functions are present in cells
An interface can be seen as a bundle of methods.is it the same as
com.sun.star.sheet.XCalculatable?
or we have to write another instruction?
http://api.openoffice.org/docs/common/r ... table.htmlReference on c.s.s.XCalculatable wrote: Methods' Summary
calculate recalculates all dirty cells.
calculateAll recalculates all cells.
isAutomaticCalculationEnabled returns whether automatic calculation is enabled.
enableAutomaticCalculation enables automatic calculation.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice