简体   繁体   English

在Excel VBA工作簿的立即窗口中执行多行

[英]Execute Multiple Lines in the Immediate Window of an Excel VBA workbook

Am I limited to execute only 1 command in the Excel VBA Immediate Window. 我是否只能在Excel VBA立即窗口中执行1条命令? Is there a way to execute multiple statements? 有没有一种方法可以执行多个语句?

Use the colon : key to concatenate multiple statements together. 使用冒号:键将多个语句连接在一起。 (ex: MsgBox "msgBox1" : MsgBox "msgBox2" will display two alert message boxes. (例如: MsgBox "msgBox1" : MsgBox "msgBox2"将显示两个警报消息框。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM