一、XML编写
<?xml version="1.0" encoding="utf-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="MyTab" label="测试标签">
<group id="Group1" label="测试组">
<button id="Button1" label="测试按钮" imageMSO="T" size="large" onAction="test"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
二、回调函数
Public Sub test(control As IRibbonControl)
MsgBox "Hello world!"
End Sub
标签:XML,control,Sub,自定义,Excel,功能区 From: https://www.cnblogs.com/meng-xiaoyi/p/17026601.html