Ciao a tutti,
Ho tentato di definire alcune semplicissime funzioni tramite macro; ho 
dato in pasto alle funzioni argomenti prima come valori numerici 
costanti e poi come variabili in celle, ma non funziona in nessun modo.
Ho riempito 3 celle cosí con valori casuali:
A1=5
B1=10
C1=20
Le funzioni:
REM *** VOL(a,b,c,) calcola volume di un parallelepipedo di lati a,b,c***
Function VOL(a,b,c)
VOL=a*b*c
End Function
rem****
NOTA Ho copiato da la funzione definita dall’utente VOL da questo 
link:https://help.libreoffice.org/latest/it/text/scalc/guide/userdefined_function.html 
<https://help.libreoffice.org/latest/it/text/scalc/guide/userdefined_function.html>
REM **** GUAD calcola il guadagno dati costi c e ricavi r *****
Function GUAD(c,r)
GUAD=(r-c)/c
End Function
REM *** ESCNTXY quanto é scontato x rispetto a y ****
Function ESCNTXY(x,y)
ESCNTXY=(y-x)/y
End Function
*I risultati:*
VOL(5,10,20) → mi restituisce Err:509
VOL(A1,B1,C1) → mi restituisce Err:501
GUAD(5,10) → mi restituisce “Errore di runtime BASIC: l’argomento non é 
opzionale”
GUAD(A1,B1) → mi restituisce Err:501
ESCNTXY(5,10) → mi restituisce “Errore di runtime BASIC: l’argomento non 
é opzionale”
ESCNTXY(A1,B1) → mi restituisce Err:501
PS: con versioni precedenti di LO, alcuni anni fa, le funzioni GUAD ed 
ESCNTXY funzionavano perfettamente.
Grazie per l'aiuto.
Aldo
Mia configurazione:
/
Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; 
VCL: win
Locale: it-IT (en_GB); UI: it-IT
Calc: CL
/
--
Come cancellarsi: E-mail users+unsubscribe@it.libreoffice.org
Problemi? https://it.libreoffice.org/supporto/mailing-lists/come-cancellarsi/
Linee guida per postare + altro: https://wiki.documentfoundation.org/Local_Mailing_Lists/it
Archivio della lista: https://listarchives.libreoffice.org/it/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Context
- [it-users] funzioni definite dall'utente, che non funzionano · Aldo Colamartino
 
  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.