Showing posts with label negative number in visual basic. Show all posts
Showing posts with label negative number in visual basic. Show all posts

Saturday, October 1, 2016

Positive and Negative Number Checker in Visual Basic

A simple program that I wrote using Microsoft Visual Basic 5 to check if the given integer number by our user is a positive or negative number. The program code is very simple and easy to understand.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following 
jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My mobile number here in the Philippines is 09173084360.





Sample Program Output


Program Listing

Private Sub Command1_Click()

number_value = Val(Text1.Text)

If (number_value >= 0) Then
  Label4.Caption = "The given number " & number_value & " is a Positive Number."
Else
    Label4.Caption = "The given number " & number_value & " is a Negative Number."
End If
  
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Label4.Caption = " "
End Sub