【发布时间】:2018-02-02 17:59:57
【问题描述】:
我正在将一个旧的 dna 文件转换为 Visual Basic .net,以便在 Excel 64 位中使用
用于在 32 位版本中显示的功能区(用于更改默认值的简单 msgbox)但功能区未在新版本中显示。
我正在使用 VS 2017。
用于创建功能区的代码:
' Can make a class that implements ExcelDna.Integration.CustomUI.ExcelRibbon
' to get full Ribbon access.
Public Class MyRibbon
Inherits ExcelRibbon
Public Sub OnButtonPressed(control As IRibbonControl)
SetDefault()
End Sub
End Class
功能区 dna 文件中的代码:
<CustomUI>
<!-- Inside here is the RibbonX xml passed to Excel -->
<customUI xmlns = "http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab idMso = "TabAddIns" >
<group idQ="x:ORSErlang64" label="ORSErlang64">
<button id="C1" label="Set Default" size="large"
imageMso="StartAfterPrevious" onAction="OnButtonPressed"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
</CustomUI>
我不知道我做错了什么,我在网上可以找到的大多数示例都是 c#,而不是 vb.net
【问题讨论】:
标签: vb.net visual-studio-2017 excel-2013 excel-dna