Tuesday, May 24, 2022

Positive and Negative Number Checker in Visual Basic 6

 A simple program that I wrote using Visual Basic 6 asks the user to give a number and then the program will check if the given number is a positive or negative number.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.







Program Listing

Private Sub Command1_Click()
' Written By Jake Rodriguez Pomperada, MAED-IT, MIT
' www.jakerpomperada.com  and www.jakerpomperada.blogspot.com
' jakerpomperada@gmail.com

Dim a As Integer

a = Val(Text1.Text)

If (Text1.Text = "") Then
MsgBox "Cannot Be Empty. Try Again", vbInformation, "Result"
Text1.SetFocus
ElseIf (a < 0) Then
MsgBox "The given number " & a & " is a Negative Number", vbInformation, "Result"
Text1.SetFocus
Else
MsgBox "The given number " & a & " is a Positive Number", vbInformation, "Result"
Text1.SetFocus
End If
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text1.SetFocus
End Sub

Private Sub Command3_Click()
End
End Sub



No comments:

Post a Comment