مجهود كبير يا استاذ أبو هاجر(واصل)
معاك حق اخي justice لبد وضع الكود في الأطار الخاص بيه لكن يلزم نقدر ثعب الأستاذ
معدرى اخي ابو هاجر الكود بالطريقة الصحيحة
Private Sub GuessAge()
Dim userGuess As Integer
Dim age As Integer
age = 25
userGuess = Val(InputBox(“Guess a number between 20 and 30.”, “Guess Age”))
If (userGuess > age) Then
MsgBox (“Too high!”)
MsgBox (“The answer is “ & age)
End If
If (userGuess < age) Then
MsgBox (“Too low!”)
MsgBox (“The answer is “ & age)
End If
If (userGuess = age) Then MsgBox (“You got it!”)
End Sub