Dear all,
I attach an excel file that contains the Ribbon created by OfficeRibbonX with the code:
This ribbon contains 2 buttoms . The customButton1 visibility depends on the value of getVisible="GetButtonVisibility", that is a Public function designed in vba like this:
>>> use code - tags <<<
I think it is easy but regrettably the ribbon Reuniones appears but with the next error message: wrong number of arguments or invlid property assignment.
Do you know what I have done wrong?
Regards.
Your help is much appreciated.
I attach an excel file that contains the Ribbon created by OfficeRibbonX with the code:
<customUI xmlns=[URL]http://schemas.microsoft.com/office/2009/07/customui[/URL]>
<ribbon>
<tabs>
<tab id="customTab" label="Reuniones">
<group id="customGroupBuscar">
<button id="customButton1" label="Search " size="large" onAction="Macro1" getVisible=" GetButtonVisibility " />
<button id="customButton2" label="Edit" size="large" onAction="Macro2" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
This ribbon contains 2 buttoms . The customButton1 visibility depends on the value of getVisible="GetButtonVisibility", that is a Public function designed in vba like this:
>>> use code - tags <<<
Code:
Public Function GetButtonVisibility(control As IRibbonControl) As Boolean
Dim currentUserName As String
currentUserName = Application.UserName
MsgBox currenUserName
If currentUserName = "Iñigo Remirez de Ganuza" Then
GetButtonVisibility = False
Else
GetButtonVisibility = True
End If
End Function
Do you know what I have done wrong?
Regards.
Your help is much appreciated.
Attachments
Last edited by a moderator: