'VBA error 'Wrong number of arguments or invalid property assignments' when running macro via custom button
I have a macro that I call via a tab/group/button added by the Custom UI Editor -
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="false">
<tabs>
<tab id="tabCustomActions" label="Custom ActionsXXX" insertAfterMso="TabDeveloper">
<group id="GroupTLA" label="TLA Actions">
<button id="buttonFormatTLA" label="Format as TLA" image="TLALogo" size="large" onAction="start_tla" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
The button shows up just fine, with my custom logo, but when ever I click the button I get the follow error -

VBA is not opened following this error, as it usually is, and no code within VBA is indicated as the problem if I open the developer console and then try and click the button.
Strangely though, if I try and run the macro manually, it works fine with no errors. Does anybody have any ideas how to solve this?
Here is my full code in a Pastebin, should you wish to view it. Thanks.
Solution 1:[1]
It is old thread, but maybe it will help someone. If you make 'control' argument optional, you can run either from Ribbon button or directly from VBA or Form button.
Sub start_tla(Optional control As IRibbonControl)
'Your code goes here
End Sub
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andrew |
