Stworzyłem dodatek Excel, który pojawia się w interfejsie użytkownika, ale gdy go klikam, nie działa.Excel 2007 addin wyświetla, ale nie działa
Option Explicit
Public sheetscol As Collection, depshtnm
Public hasdeps As Boolean
'***********************************
'*finds the external dependencies of the cell, and places them in the 'sheetscol' collection
'***********************************
Sub depfinder_eventhandler(control As IRibbonControl)
depfinder
End Sub
'--------------
Sub depfinder
...
End sub
To CustomUI XML:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
xmlns:m="MattSinSpace">
<ribbon>
<tabs>
<tab idQ="m:MattTab" label="Matt Tools" insertAfterMso="TabHome">
<group idQ="m:migration" label="migration tools">
<button idQ="m:DepFinderButton1" label="Highlight Dependencies" size="large"
onAction="depfinder_eventhandler" imageMso="HappyFace" />
</group>
<group idQ="m:RS1" visible = "false"/>
<group idQ="m:RS2" visible = "false"/>
</tab>
</tabs>
</ribbon>
</customUI>
Jestem całkiem amatorskie w podejmowaniu dodatki i używam tej strony, aby mi pomóc:
http://erpcoder.wordpress.com/2012/05/30/how-to-create-a-custom-ribbon-addin-for-excel-2010/
Wygląda na to, że wszystko jest w porządku, w moim kodzie i moim interfejsie użytkownika, jedyną różnicą jest to, że umieściłem przestrzeń nazw.
Zobacz, czy to pomaga? http://stackoverflow.com/questions/8850836/how-to-add-a-custom-ribbon-tab-using-vba/8852767#8852767 –