Tools for Debugging Code : Debug.Print « Language Basics « VBA / Excel / Access / Word






Tools for Debugging Code

 
Sub addNumbers()
   Dim intNumber1 As Integer
   Dim intNumber2 As Integer
   Dim intSum As Integer

   intNumber1 = 5
   intNumber2 = 3
   intSum = intNumber1 + intNumber2
   Debug.Print "The sum of the two numbers is: " & intSum
End Sub

 








Related examples in the same category

1.Use Debug.Print to output the message to the immediate window