Home / User Contributed Macros / Square of a Number

Square of a Number


This function calculates the square of a number.
Public Function MYSQ(ARG As Double) As Double
MYSQ = ARG * ARG
End Function
 

    algoritmus  01 Sep 2010 
    This is equal with: =(number)^2

    ^2 is the square.....

    root is ^-2 etc etc
    Clifford Paulick  11 Sep 2023 
    In Zoho Sheet's VBA Editor:
    Encountered error at line 1, column 0:You can not run a macro containing arguments
    Samuel Ponraj P  13 Sep 2023 
    Hello Clifford,

    Greetings from Zoho Sheet Team!

    We regret the challenge you come across.

    Upon checking we see that you have used a different way to call a function. We request you follow the below macro to call the fuction.

    Sub callFunction()
    Dim dd As Double
    dd = MYSQ(10)
    MsgBox dd
    End Sub

    Public Function MYSQ(ARG As Double) As Double
    MYSQ = ARG * ARG
    End Function

    Please try the same and let us know if you face any deviation.

    Have a great day!

    Best Regards,
    Sam | Customer Success Team



     RSS of this page