Use Debug.Print to output the message to the immediate window
Sub addNumbers1()
'Declare the variables
Dim intNumber1 As Integer
Dim intNumber2 As Integer
Dim intSum As Integer
'Create InputBoxes to enter numbers
intNumber1 = 1
intNumber2 = 2
'Add numbers
intSum = intNumber1 + intNumber
Debug.Print "The numbers entered were " & intNumber1 & " and " & intNumber2
End Sub
Related examples in the same category