Thread: Cell Menu
View Single Post
  #2   Report Post  
GregR
 
Posts: n/a
Default

Might be nice if I added the code:
Sub AddtoCellMenuAbs()

Dim iCtr As Long
Dim myMacros As Variant
Dim myCaptions As Variant

Dim cb As CommandBar
Set cb = Application.CommandBars("Cell")

myMacros = Array("Absolute.Absolute", "Relative", "AbsoluteRow",
"AbsoluteCol")
myCaptions = Array("Absolute", "Relative", "Absolute Row", "Absolute
Col")

With cb.Controls

For iCtr = LBound(myMacros) To UBound(myMacros)
With .Add(Type:=msoControlButton, temporary:=True)
.Caption = myCaptions(iCtr)
.OnAction = ThisWorkbook.Name & "!" & myMacros(iCtr)
' .FaceId = 103
' .BeginGroup = True
End With
Next iCtr
End With
'in your workbook_open/auto_open code, you can just have a
'Call AddToCellMenu
End Sub

Greg
"GregR" wrote in message
...
I have the following code which adds the macros to the cell menu. How do I
begin a group for the array or assign the array to a submenu. TIA

Greg