cyborg18
03-08-2011, 11:36 PM
hi,
I want to create a custom right click menu in excel (2003), but i don't know how to create more then one level. When i use this code, i get two captions (in level 1) :
1 LEVEL
FIND
COPY
THE CODE FOR 1 LEVEL
Set Control_1 = Application.CommandBars("Cell").Controls.Add
With Control_1
.Caption = "FIND"
.OnAction = "main.FIND"
.BeginGroup = True
End With
'----------------------------------------
Dim Control_2 As CommandBarControl
Set Control_2 = Application.CommandBars("Cell").Controls.Add
With Control_2
.Caption = "COPY"
.OnAction = "main.COPY"
.BeginGroup = True
End With
What is the the code for more levels?
For instance :
2 LEVELS
FIND #- FIND SHEET
#####- FIND COLUMN
#####- FIND ROW
COPY #- COPY CELL
#####- COPY RANGE
Thanks :-)
I want to create a custom right click menu in excel (2003), but i don't know how to create more then one level. When i use this code, i get two captions (in level 1) :
1 LEVEL
FIND
COPY
THE CODE FOR 1 LEVEL
Set Control_1 = Application.CommandBars("Cell").Controls.Add
With Control_1
.Caption = "FIND"
.OnAction = "main.FIND"
.BeginGroup = True
End With
'----------------------------------------
Dim Control_2 As CommandBarControl
Set Control_2 = Application.CommandBars("Cell").Controls.Add
With Control_2
.Caption = "COPY"
.OnAction = "main.COPY"
.BeginGroup = True
End With
What is the the code for more levels?
For instance :
2 LEVELS
FIND #- FIND SHEET
#####- FIND COLUMN
#####- FIND ROW
COPY #- COPY CELL
#####- COPY RANGE
Thanks :-)