PetLahev
New Member
- Joined
- Jul 30, 2009
- Messages
- 28
Hi, I've created my gallery where user can choose my color (I need more colors than the themes offers) and I use a label of each item like RGB value.
My question: How can I get label of item in VBA callbacks?
Look at Ribbon's code bellow (I had to put it as image)
and here is my code in VBA
Because I need to work with number which are stored in label property I'd like to know how Can I get the label property of selected item.
Of course, I don't want to show to user label property - because it is strange for them .
My question: How can I get label of item in VBA callbacks?
Look at Ribbon's code bellow (I had to put it as image)
and here is my code in VBA
Code:
Dim mIRibb As IRibbonUI
'Callback for customUI.******
Sub idc_LoadRibbon(ribbon As IRibbonUI)
Set mIRibb = ribbon
End Sub
'Callback for idc_galColor getItemLabel
Sub idc_GetLabel(control As IRibbonControl, index As Integer, ByRef returnedVal)
MsgBox "Control Id = " & control.id & vbNewLine & _
"Index = " & index & vbNewLine & _
"ReturnVal = " & returnedVal, vbInformation, "GetItemLabel"
End Sub
'Callback for idc_galColor onAction
Sub idc_Color_Click(control As IRibbonControl, id As String, index As Integer)
MsgBox "Control Id = " & control.id & vbNewLine & _
"ID = " & id & vbNewLine & _
"Index = " & index, vbInformation, "OnAction"
End Sub
Of course, I don't want to show to user label property - because it is strange for them .