oseitutuSamuel
Board Regular
- Joined
- Jul 31, 2015
- Messages
- 82
Hello Fellows,
I have created a RibbonX dynamic buttons. The progran reads a list in Excel column to create the buttons for the control. The entries in the Excel column are used as labels for the
dynamic buttons. A common Callback routine is used for each button. That is, the butt******* for each button calls a single Callback routine. Because of that I need to know
the label for the button that was clicked so I can take action. The Callback routine is as shown below:
Please notice that the routine receives the button that is clicked as a control. The second line tries to show me the label of the button that is passed to the routine.
However I get the error that the property is not supported. I thought I should be able to retrieve the label property that I have set for a button.
Any help, please
Thanks
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]Sub rxbtnDyna_onAction(control As IRibbonControl)
MsgBox control.Label
If lngNoOfCompanyVideos < 2 Then Exit Sub[/FONT]
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]lngNoOfCompanyVideos = lngNoOfStoredVideosAfterUpload
'Callback for button onAction
If control.ID = "rxbtnRefresh" Then
rxIRibbonUI.InvalidateControl ("rxdmnuCompanyVideos")
ElseIf control.ID <> "rxbtnAddVideo" Then
Call PlayVideo(control)
End If
End Sub[/FONT]
I have created a RibbonX dynamic buttons. The progran reads a list in Excel column to create the buttons for the control. The entries in the Excel column are used as labels for the
dynamic buttons. A common Callback routine is used for each button. That is, the butt******* for each button calls a single Callback routine. Because of that I need to know
the label for the button that was clicked so I can take action. The Callback routine is as shown below:
Please notice that the routine receives the button that is clicked as a control. The second line tries to show me the label of the button that is passed to the routine.
However I get the error that the property is not supported. I thought I should be able to retrieve the label property that I have set for a button.
Any help, please
Thanks
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]Sub rxbtnDyna_onAction(control As IRibbonControl)
MsgBox control.Label
If lngNoOfCompanyVideos < 2 Then Exit Sub[/FONT]
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]lngNoOfCompanyVideos = lngNoOfStoredVideosAfterUpload
'Callback for button onAction
If control.ID = "rxbtnRefresh" Then
rxIRibbonUI.InvalidateControl ("rxdmnuCompanyVideos")
ElseIf control.ID <> "rxbtnAddVideo" Then
Call PlayVideo(control)
End If
End Sub[/FONT]