Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Custom ribbon dropdown
Hello,
I have a custom ribbon tab that contains two dropdowns. Dropdown(1) has a GetSelectedItemIndex built in to show a value corresponding to the selected worksheet name when opened/activated. Dropdrown(2) does not require this. When I select a dropdown(1) value, dropdown(2) is Invalidated and resets its list showing a blank value allowing the user to reselect any value. This is by design and works great. When I select a dropdown(2) value, dropdown(1) is also Invalidated to reset its values but its GetSelectedItemIndex does not allow the control to show a blank allowing the user to select any value. I have tried to intercept this by setting dropdown(1)'s Index to "-1", but this produces an error. How can I get around this? 'Callback for Dropdown getSelectedItemIndex Sub GetDropdownIndex(control As IRibbonControl, ByRef Index) Select Case control.id Case "Dropdown(1)" If ActiveSheet.Name = "CFSTotals" Then ' Sets the timesheet dropdown to a blank???? Index = -1 Else ' Sets the timesheet dropdown value to active worksheet. Index = Workbooks(gsEmployee & ".xlsx").ActiveSheet.Index - 1 End If End Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Assign custom number format to the ribbon | Excel Discussion (Misc queries) | |||
Custom menus don't appear under custom ribbon tab | Excel Programming | |||
no custom button in ribbon | Excel Programming | |||
Macro Fault on Custom Ribbon | Excel Programming | |||
2007 Ribbon dropdown | Excel Programming |