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](https://notesformsc.org/wp-content/uploads/2019/10/Output-Absolute-Value.png)