Addition: you can drag the button over cell A1 and set the "number field" ("formatted field" in English UI) to visible="no"

Regina Henschel schrieb:
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



--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to