That worked nicely, thank you. Since this is the only item on the right
click menu is there a way to automatically expand the combo box so it shows
the list as if the user has already clicked on the down arrow?
"Chip Pearson" wrote:
I would put a combobox dropdown on the right-click menu. E.g.,
Sub AAA()
Dim Ctrl As Office.CommandBarComboBox
Set Ctrl = Application.CommandBars("Cell").Controls.Add( _
Type:=msoControlComboBox, temporary:=True)
With Ctrl
..Caption = "Machine ID"
..AddItem "A"
..AddItem "B"
..AddItem "C"
..OnAction = "DoMachine"
End With
End Sub
Sub DoMachine()
With Application.CommandBars.ActionControl
ActiveCell.Value = .List(.ListIndex)
End With
End Sub
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Paulymon" wrote in message
...
I want to use the right click function to allow a user to select
a machine
code. There are 48 machine codes but when I write the code it
only displays
25 in the right-click menu, is there a way beyond this
limitation?
If not, what are my other options?