Home > Software engineering >  Make excel cell right-click menu Com add-in
Make excel cell right-click menu Com add-in

Time:10-01

Below is done inside the VBA, how to make it COM add-in, can be generated in a IDTExtensibility2_OnConnection right-click menu (in VB xlApp are added), but cannot mix UserForm1 click, don't know where the problem is,

 Sub Auto_open () 
On the Error Resume Next
CommandBars (" CELL "). Controls (" relate "). The Delete
With CommandBars (" cell "). Controls. The Add (before:=5, Temporary:=True) 'is added to the fifth place
The Caption="relate"
Grouping. BeginGroup=True 'add line
The ICONS shown FaceId=263 '
.=msoButtonIconAndCaption 'Style ICONS and text display
. OnAction="relate" 'designated to run the macro
End With
End Sub

Sub relate ()
UserForm1. Show
End Sub
  •  Tags:  
  • VBA
  • Related