必须先创建 变量 ,然后才能在“监视”窗口或“即时”窗口中显示变量,然后才能在“即时”窗口中为其赋值。 此错误的原因及解决方案如下:
- 您尝试显示刚在代码中输入的逻辑变量的值,然后再在中断模式中至少执行一次“单步执行”命令。 - 单步执行代码以强制编译新语句。 
- You tried to display the value of a local variable that you just added in a procedure farther down the call chain by moving to the procedure using the Calls dialog box. - 您必须实际返回到该过程,然后才能在其上下文中显示变量。 
有关其他信息,选择有问题的项并按 F1(在 Windows 中)或 HELP(在 Macintosh 上)。
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。