- Home
·
- Math/Dates
·
- Compare to numbers together, to find which is bigger, or if there the same.
Compare to numbers together, to find which is bigger, or if there the same.
Compare to numbers together, to find which is bigger, or if there the same.
API Declarations
dim ilnumber As String
Rate Compare to numbers together, to find which is bigger, or if there the same.
(2(2 Vote))
create a label and call it lblcompare
-
Private Sub lblcompare_Click()
lblcompare.BackColor = vbRed
iknumber = InputBox("Enter Your First Number") 'Asks for your first number'
ilnumber = InputBox("Enter Your Second Number") 'Input your second number via an input box
If iknumber > ilnumber Then 'If the first number is bigger then...'
MsgBox "The First Number Is Bigger" 'Then this message is displayed'
ElseIf ilnumber > iknumber Then 'If the number is smaller....'
MsgBox "The Second Number Is Bigger" 'Then this message is displayed'
Else 'But if there both the same'
MsgBox "There Are Equal" 'This message is displayed'
End If
lblcompare.BackColor = vbWhite 'This changes the button back to white'
End Sub
Compare to numbers together, to find which is bigger, or if there the same. Comments
No comments yet — be the first to post one!
Post a Comment