Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Name of Text-Box Right-Click Command Bar?
The following macro inserts two new selections to the menu which appears when
you right-click on a worksheet: Sub Add_Controls() Dim i As Long Dim onaction_names As Variant Dim caption_names As Variant onaction_names = Array("InputMacro", "RegroupObjects") caption_names = Array("WORKDAY Edit", "Restore Project Info Boxes") With Application.CommandBars("Cell") For i = LBound(onaction_names) To UBound(onaction_names) With .Controls.Add(Type:=msoControlButton) .OnAction = ThisWorkbook.Name & "!" & onaction_names(i) .Caption = caption_names(i) End With Next i End With End Sub I'd like the same two selections to appear on the right-click menu which appears when you are working in a text box, too. Can anyone tell me what the name or index number is of the command bar which appears when you right-click a text box? Thanks in advance! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Name of Text-Box Right-Click Command Bar?
Hi Altamont
I think you are looking for With Application.CommandBars("ActiveX Control") -- Regards Ron de Bruin http://www.rondebruin.nl "Altamont" wrote in message ... The following macro inserts two new selections to the menu which appears when you right-click on a worksheet: Sub Add_Controls() Dim i As Long Dim onaction_names As Variant Dim caption_names As Variant onaction_names = Array("InputMacro", "RegroupObjects") caption_names = Array("WORKDAY Edit", "Restore Project Info Boxes") With Application.CommandBars("Cell") For i = LBound(onaction_names) To UBound(onaction_names) With .Controls.Add(Type:=msoControlButton) .OnAction = ThisWorkbook.Name & "!" & onaction_names(i) .Caption = caption_names(i) End With Next i End With End Sub I'd like the same two selections to appear on the right-click menu which appears when you are working in a text box, too. Can anyone tell me what the name or index number is of the command bar which appears when you right-click a text box? Thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How change dimensions of data label text box in pie chart? | Charts and Charting in Excel | |||
Count Intervals of Filtered TEXT values in Column and Return Count across a Row | Excel Worksheet Functions | |||
On click, copy text into another cell - XL2K | Excel Worksheet Functions | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) | |||
Why do my text boxes disappear from my chart when I click out? | Charts and Charting in Excel |