This program will calculate your age by asking the current year
This program will calculate your age by asking the current year
API Declarations
Dim age As Integer
Dim input1 As String, input2 As Integer, input3 As Integer
Rate This program will calculate your age by asking the current year
(1(1 Vote))
End
End Sub
Private Sub cmdGo_Click()
input1 = InputBox("What is your name?:", "Name please...")
input2 = InputBox("What year were you born?:", "year please...")
input3 = InputBox("Enter current year:", "current year please...")
age = input3 - input2
lblDisplay.Caption = "You are " & input1 & " and you are " & age & " Years old"
End Sub
This program will calculate your age by asking the current year Comments
No comments yet — be the first to post one!
Post a Comment