

The Visual Basic Editor window will open. Press Alt+F11 (hold Alt key, then press F11 key) from anywhere in Excel.The fastest way to get to the Immediate Window is to: The Immediate window is located in the Visual Basic Editor window.

Once you understand the capabilities of this tool, you will find yourself using it all the time.

This post will explain 5 different uses for the Immediate Window. It is built into the Visual Basic Editor, and has many different uses that can be very helpful when writing macros, debugging code, and displaying the results of your code.Įvery Excel user can benefit from the Immediate Window, even if you're not writing macros.

The VBA Immediate Window is an awesome tool that allows you to get immediate answers about your Excel files, and quickly execute code. Free file to download contains VBA code samples. Learn how to get answers about your Excel file, quickly run macros, debug your code, and more. When you are stepping through the procedure You can select a variable or object and right click on it to see all properties and its values in the watch window.The VBA Immediate Window is a great tool that can help any Excel user, even if you are not writing macros. You can see all available variable in the procedure which you are debugging by step by step. You can select the ‘Local Window’ from the View menu to see the Local Window. It is one of the most usefull commands in the vba debugging tasks, you can use Debug.Print statement to print the result of any variable or any text in the Immediate Window Locals Window You can select the ‘Immediate Window’ from the View menu to see the immediate Window. To toggle the break point you can press the F9 again.Īlternatively you can use stop statement in the code, if you start executing the code, it will stops at stop statement in the code. if you run the code by pressing F5, it will start executing the procedure and stops at the Break Point. Place the cursor at the line which you want to place the Break Point and press F9, it will place the break point. You can run the code from one particular statement to another By placing the Break Points. It will take through you by line by line and you can see the result/action of the statement wile passing that particular line. You can step through your code line by line by pressing F8. Place your cursor in the procedure which you want to debug: It will execute that particular procedure/macro. Place the cursor in the procedure which you want to run and Press F5 or click on the run button. VBA provides several options for debugging VBA code: Run the Procedure Debug Code in Excel VBA is the one of important task while writing programs, it helps you in troubleshooting your code. When you are writing the program you may want to test whether particular statement is working fine.
