Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


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+help@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

Context


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.