PC Review


Reply
Thread Tools Rate Thread

Custom ribbon dropdown

 
 
condotta@shaw.ca
Guest
Posts: n/a
 
      4th May 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom button image not loading on custom ribbon Joshua Microsoft Excel Programming 1 16th Apr 2010 05:33 PM
Default entry in dropdown on Ribbon xp Microsoft Excel Programming 1 1st Dec 2009 07:56 PM
2007 Ribbon dropdown condotta@shaw.ca Microsoft Excel Programming 0 4th Jan 2008 10:52 PM
Opening a report from the ribbon doesn't show it's custom ribbon =?Utf-8?B?QXJpYW4gR2VlcnRzZW1h?= Microsoft Access Reports 0 20th Aug 2007 11:34 AM
Ribbon Dropdown item reassignment =?Utf-8?B?UmFqZXNoIEs=?= Microsoft Outlook Program Addins 0 17th Aug 2007 01:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:37 AM.