Jack Cambel schrieb:
Hello, I want to learn how to create a button to recalculate a cell
with randbetween function. I know it is going to be a bit
complicated, can anyone point out where I can I find resources online
and where I can have a handy reference of the macros.
A cell is recalculated, when a referenced cell is changed. You can use
this and use not purely "=RANDBETWEEN(1;6)" for example but use
something like "=RANDBETWEEN(1;6)+0*A1". If you now change the value in
A1, the cell containing this tricky RANDBETWEEN will recalculate.
To alter A1 with a button, you can use a macro. Or you can trick
further: Insert a control "number field" and bind it to the cell A1 with
a default value of 0 for example. Then insert a button and set its
action to "reset form". Each time you hit the button the form is reset
and therefore the number field is "reset" and the cell A1 gets a "new"
value, although the value is not really changed. But it triggers the
recalculation.
Kind regards
Regina
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.