VB 6 – Abs() Function

In this example, we will use Abs() math function of Visual Basic 6 to find absolute value of a number.

Program Code: Abs( ) Function

Private Sub Command1_Click()
Dim Absolute As Integer

Absolute = Abs(Val(Text1.Text))

MsgBox ("The Absolute value is" & " " & Absolute)

End Sub

Output : Abs ( ) Function

Output - Absolute Function
Output – Absolute Function
Skip to content