Visual Basic Macros for Spreadsheets
Browse, Contribute and Share Macros!
|
Navigate Pages
Welcome
Sample Macros
User Contributed Macros
Split Function
Lightening Colors
Find and Replace
Square of a Number
Mail Notification
Trim Words
Track Editing Time
Copy Sheet Data
Insert Cells
Apply Background Color
Apply Colored Border
Paste Values
Highlight Largest Value
JP
Delete Duplicate Rows
Increment counter if present else add it to table
Convert left - right reports (columns) to vertical lines
To Do List
Merge Content
Home
/
User Contributed Macros
/
Square of a Number
Uploading ....
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
Comments (
3
)
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
^2 is the square.....
root is ^-2 etc etc
Encountered error at line 1, column 0:You can not run a macro containing arguments
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