Resetting Dropdown list in Ribbon

Joined
Jan 26, 2014
Messages
1
Reaction score
0
Hi
In a VBA project there is a drop down list in the ribbon which gets set to the first item in the drop down list. I would like the drop down box to be reset to blank after the code is executed and not to the first item. I have tried to use this code:-

Sub GetSelectedItem(control As IRibbonControl, ByRef returnedVal)
returnedVal = -1
End Sub

Interestingly, this code works in one computer whereas in another computer it generates a Custom UI runtime error:-

The callback Function "--------" on control "----" returned an invalid value.
The function however continues to run normally after i enter "ok" in the error box.
2.Changing the returnedVal to 0 in the above code removes this error but the item selected becomes the first item in the list.
can some one please help.
Jas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top