开发者

Message boxes (VBA): how can I include/use them in my Excel Macros?

开发者 https://www.devze.com 2023-01-07 17:41 出处:网络
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

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 o开发者_运维技巧r helpful hints. Michael.


Just use

MsgBox ("message here")

And if you want to go to the code so that you can debug from there on use CTRL + BREAK

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号