Debug.Print is used to see that how your code works. It is very useful
tool in VBA. Many people get confused about where the output ends up. This can be useful
when you want to see the value of a variable in a certain line of your
code, without having to store the variable somewhere in the workbook or
show it in a message box.
Debug. Print is telling VBA to print that information in the Immediate Window. To view this window you can use the
the shortcut key Ctrl + G
OR
Follow the Following steps:
- Open the Visual Basic Editor in Excel by pressing the
Alt +F11 Key, then - Go to the View Menu and then
- Select the Immediate Window option.
Note: Debug.Print will still write values to the window even if it is
not visible.
Below is the Debug.Print example for your reference:
No comments:
Post a Comment