简体   繁体   English

在Excel中为分配了宏的按钮添加注释

[英]Adding a comment to a button, with a macro assigned, in excel

I was wondering how you add a comment to a button in excel. 我想知道如何在Excel中向按钮添加注释。 So when I hold the coursor over the button, the comment will appear. 因此,当我将光标放在按钮上时,将显示注释。

Maybe you need to do it in VBA? 也许您需要在VBA中执行此操作?

Please give me the line of code needed or any other help methods and I would really appreciate it. 请给我所需的代码行或任何其他帮助方法,我将不胜感激。

Once you add the button, you can right click and get properties (while in Design Mode). 添加按钮后,您可以右键单击并获取属性(在“设计模式”下​​)。 Choose View Code. 选择查看代码。 VBA will come up, and you will see the OnClick event there. VBA将出现,您将在此处看到OnClick事件。

Just choose the down arrow on the right side of the screen, and you will see all of the events you can use with this button. 只需选择屏幕右侧的向下箭头,您将看到可以使用此按钮使用的所有事件。 One of them is MouseMove. 其中之一是MouseMove。 Unfortunately, Excel is not like Access in that you can't set a MouseMove event on the detail of your form to take away the comment after they see it. 不幸的是,Excel与Access不同,您不能在表单的详细信息上设置MouseMove事件以在看到注释后将其删除。 But... depending on your needs, you could pop-up a message box or something like that. 但是...根据您的需要,您可以弹出一个消息框或类似的内容。

Hope that helps. 希望能有所帮助。

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

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