Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't believe this is possible.
-- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Paulymon" wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Axis Options - Minimum and Maximum Values | Charts and Charting in Excel | |||
CHANGE RIGHT CLICK OPTIONS | Excel Discussion (Misc queries) | |||
Right click delete options | Excel Discussion (Misc queries) | |||
how do I add more toolbar options to my right click options | Excel Discussion (Misc queries) | |||
Amending Right-Click Options | Excel Programming |