Use the Immediate window
The Immediate window displays information resulting from debugging statements in your code or from commands typed directly into the window.
To display the Immediate window
- From the View menu, choose Immediate window (CTRL+G).
To execute code in the Immediate window
Type a line of code in the Immediate window.
Press ENTER to execute the statement.
Use the Immediate window to:
Test problematic or newly written code.
Query or change the value of a variable while running an application. While execution is halted, assign the variable a new value as you would in code.
Query or change a property value while running an application.
Call procedures as you would in code.
View debugging output while the program is running.
Note
Immediate window statements are executed in a context—that is, as if they are entered in a specific module.
If you need help on syntax for functions, statements, properties, or methods while working in the Immediate window, select the keyword, the property name, or the method name, and press F1.
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기