我在 MS-Access 2010 中工作,我正在尝试查看在 VBA 代码中定义的变量,它已经到达断点。监视窗口中的问题 Watches 窗口中的 value 文本框有一个设定的大小,换句话说,如果值太长,则 Watches 窗口中的值被截断
如何查看变量中的整个值?
我在 MS-Access 2010 中工作,我正在尝试查看在 VBA 代码中定义的变量,它已经到达断点。监视窗口中的问题 Watches 窗口中的 value 文本框有一个设定的大小,换句话说,如果值太长,则 Watches 窗口中的值被截断
如何查看变量中的整个值?
最好为此使用中间窗口。出于这个原因,我经常使用 SQL 查询来执行此操作。
要显示这一点,请使用“查看--> 中间窗口”(或 Control+G)。
然后使用如下语法:
debug.print "This is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long stringThis is a really long string"
您可以选择并复制/粘贴中间窗口或滚动查看整个变量。
请注意,中间窗口不会自动清除,但您可以选择所有内容并随时删除。