How to recalculate Macros after closing the file?

I was wirtting handly all the functions that then i applied to many cells. I saw the result i saved and after closing the document that it took some time i reopened the document the document frozes in a grey screen where i can click the cells see the input of the cell but when i try to modify (without seeing any number) it says me that the link is being update and is a protected cell.

I only found a way to solve and see again the document without being able to run the macros as every time i want to run the macros the document needs to restart and im in the same problem. THe only way i found is increasing the security filter as this the document charges at the begin.

I Don’t understand why it was working before and now im not able to do it. All functions are depending of lots of variables and being interlinked but it should work as it did the first time. THere arent infinite loops or condtions where is not covered

Help the helper to help you and provide information.

OS = ?. Lib.O version number = ?

Which steps to you take and what was the result of each step?

A helper needs to understand all and often needs to make simulations to provide you with an answer.

OS = MAC OS X Yosemite

Libreoffice version 4.4.0.3

Basically I have an excel that i use like a model with multiple functions, firstly i didnt had functions that called to other functions results to continue. Now i incorporated some functions that calls to other functions to continue.

Functions include mutiple conditions IF with muliple conditionals AND and some Or’s. Functions dont recall inside the code as my code is merely simple functions that should work divided. Im just concerning if

the functions am i creating they should be called inside the code. If libreoffice when execute macros does it by rows or by columns. I do not really understand why it does not give any result to me. Im just merely obtaining like a Libreoffice that its frozen at the begin and shows me no cell with all screen grey even i can see the background and when i click somewhere its like i click a cell and it appears me the =function(variables) im calling and if i try to modify it says me that the cell is

protected and that i can’t modify it.
My code and my functions starts like this :
REM ***** BASIC *****

Sub Main

End Sub

Function Name(Optional Variable As Variant, _
Optional Variable As Variant, _
More Variables)

      IF ( (Variable >/</ >=/ <= / <> Variable or Condition) and/or (Variable >/</ >=/ <= / <> Variable or Condition)  ..... )  then
                     Name = "" or =Some calculation
      End If

End Function

Then All Function Nam’es are placed independetely one after another and then i call them in the cells of the excel. First time i did there was no problem.

Some Functions like Function NAME 4 requires the existance and previous result of the Function Name 1 of the previous or same row. But in theory Function Name 1 should may be calculated first. Even im not sure if the execution of macros does follow this order of position or Code, If it follows order cell postiion is well right if it follows

Code order its also correctly right the written.

ANyone can help me?