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


I understand what you are seeing, I had the same issue with a macro for a function, I called it money() for rounding financial tax calculations appropriately. At some point when I updated LO it just stopped calculating displaying as you describe and I had to go through the same rigmarole you are experiencing for it to recalculate. Not sure if I resolved the issue or gave up, I will need to dig the sheet out.
Steve

On 3/01/23 11:13 am, Michael Tiernan wrote:
On 12/23/22 11:02 AM, Andrew Pitonyak wrote:
If you are looking to cause functions to recalculate,

Thanks for the reply.

Here's the thing. It's not that I want to force a recalculate, it's that I have to in order to get the macros to respond.

Here's an example: (What I expect when the spreadsheet finishes opening.)

/*Cell*//*
*/     /*Contents*//*
*/     /*Display*//*
*/
D1
    192.168.17.231/24
    192.168.17.231/24
D2
    =ipwithoutmask(D1)
    192.168.17.231
D3
    =ipmask(D1)
    255.255.255.0
D4
    =ipmasklken(D3)
    24

Now, when I actually do open the spreadsheet, it says:

/*Cell*//*
*/     /*Contents*//*
*/     /*Display*//*
*/
D1
    192.168.17.231/24
    192.168.17.231/24
D2
    =ipwithoutmask(D1)
    #NAME?
D3
    =ipmask(D1)
    #NAME?
D4
    =ipmasklken(D3)
    #NAME?

So, if I say it differently, it *seems* like the Macros aren't run when the spreadsheet is opened.

The macro library has a "Main" entry that is empty. If I choose "Tools" -> "Macros" -> "Run macro" and then select "Main" and execute it, there's no visible change.

BUT, if I go into the contents of "D2" and add a space at the end of the formula "=ipwithoutmask(D1)" to read "=ipwithoutmask(D1) " and hit return and the macro executes and displays the proper value.

HOWEVER, none of the other cells change so I have to go into each one and do the same sort of thing, add a space at the end of the line or between the macro and the parenthesis, each time, hit return and it works properly.

This is obviously not the correct way it should work.

Hence my query about "starting" macros when the document is opened.

So, that leads to, am *I* doing something wrong?

Thanks for everyone's time.



--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

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.