Read integer number from InputBox : Variable Type « Language Basics « VBA / Excel / Access / Word






Read integer number from InputBox

 
Sub addNumbers()
   'Declare the variables
   Dim intNumber1 As Integer
   Dim intNumber2 As Integer
   Dim intSum As Integer
   'Create InputBoxes to enter numbers
   intNumber1 = 1
   intNumber2 = 2
   
   Debug.Print intNumber1 + intNumber
End Sub

 








Related examples in the same category

1.Types of Variables
2.Define an integer
3.Define a string variable
4.Mix integer and string in MsgBox