What does “=EMBED(”Forms.CheckBox.1“,”“)” do for checkboxes? [duplicate]

匿名 (未验证) 提交于 2019-12-03 10:24:21

问题:

This question already has an answer here:

I have an excel sheet with a large amount of checkboxes. I copy and pasted the checkboxes around, and every single one of them has =EMBED("Forms.CheckBox.1","") in the formula bar.

What is the significance of this? What does it do for my checkboxes? I can't find it anywhere in the VBA code.

回答1:

In 1993 Microsoft added VBA (Visual Basic for Applications) to Excel with the release of Excel 5.

Prior to that Excel included a completely different macro language, known as XLM (Excel Macros).

XLM macros have a formula syntax, and there is even a special sheet type in Excel for XLM macros called a Macro Sheet. These macro sheets are in addition to the normal worksheets and chart sheets that are more widely used today.

XLM macros still function now, even in Excel 2013.

EMBED() is an XLM function that is used by Excel to embed another OLE application into a worksheet. IT IS NOT PART OF VBA.

The ActiveX controls, of which the checkbox is one, are included with VBA as part of the MSForms 2.0 Object Library.

When you insert any OLE object into a worksheet, Excel uses the XLM EMBED() function to link to that object. As a user, you are not meant to edit this formula directly.

In your case it is linking to the checkbox control in the MSForms 2.0 Object Library.

This allows the checkbox control to actually function in the worksheet instead of on a userform.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!