消息框 (VBA):如何在 Excel 宏中包含/使用它们?
我正在通过一些相当长的旧 Excel 宏自学(阅读黑客)。然而,当我更改了相当多的行时,我想确保我知道我的新元素和重新哈希元素发生的时间和地点 - 或不发生。所以我的问题是:
- 如何插入一个简单的消息框函数,该函数会在循环/过程/事件完成时弹出?
- 添加文本来解释发生了什么(当然是硬编码)?
- 另外,包括一个“确定按钮”,使其启动下一个过程?
断点过程可能是最有效的方法,但我想使用消息框方法,以便我可以向同事展示正在发生的情况。我也希望将其纳入未来的项目中。
非常感谢您提供任何示例、链接或有用的提示。 迈克尔.
I'm teaching myself (read hacking) through some old Excel Macros that are quite long. However, as I change quite a few lines I want to be sure that I know when and where my new and re-hashed elements are occuring - or not. So my question/s is:
- How do I insert a simple message box function that will pop up when a loop/procedure/event has finished?
- Add text to it explaining what happened (hard coded ofcourse)?
- Also, include an "OK button" that makes it start the next procedure?
The breakpoint process may be the most effective way of doing this, but I would like to use the message box approach so that I can show my colleagues what is happening. Also it would be something that I'd like to incorporate into future projects.
Many thanks for any examples, links or helpful hints.
Michael.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用
,如果您想转到代码以便可以从那里进行调试,请使用 CTRL + BREAK
Just use
And if you want to go to the code so that you can debug from there on use CTRL + BREAK