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
Figure 1 – Output – Absolute Function


Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.