function to print the absolute value of a number
function to print the absolute value of a number
Rate function to print the absolute value of a number
(1(1 Vote))
Function AbsoluteVal(intVal As Integer) As Long
AbsoluteVal = intVal * 1
If AbsoluteVal < 0 Then: AbsoluteVal = intVal * -1
MsgBox "The absolute value of this number is " & AbsoluteVal
End Function
Private Sub Command1_Click()
'print absolute value of a number
Call AbsoluteVal(Text1)
End Sub
function to print the absolute value of a number Comments
No comments yet — be the first to post one!
Post a Comment