VB 6 – Int() Function

In this article, you will learn about a Int() function.The int() function will change any double or real number into integer and drop the real part.


For example,

234.56 becomes 234

Example Program: Int() Function

Private Sub Command1_Click()

Dim Num As Double, Result As Double

Num = Val(Text1.Text)

Result = Int(Num)

Text2.Text = Str(Result)

End Sub

Private Sub Command2_Click()

  Text1.Text = ""
  Text2.Text = ""
End Sub

Output: Int() Function

Output - Int Function
Output – Int 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.