Create A User-defined Menu / Create Your Own Menu And Assign A Macro To Them İn The "extensions" Section Online Excel and Excel Macro (VBA) Courses Copy Macro 'For online Excel courses click: https://www.excelsizeyeter.com/excelwithkenan.com/udemy_giris.php Sub AddMenus() Dim cMenu1 As CommandBarControl Dim cbMainMenuBar As CommandBar Dim iHelpMenu As Integer Dim cbcCutomMenu As CommandBarControl '(1)Delete any existing one. We must use On Error Resume next _ in case it does not exist. On Error Resume Next Application.CommandBars("Worksheet Menu Bar").Controls("&New Menu").Delete On Error GoTo 0 '(2)Set a CommandBar variable to Worksheet menu bar Set cbMainMenuBar = _ Application.CommandBars("Worksheet Menu Bar") '(3)Return the Index number of the Help menu. We can then use _ this to place a custom menu before. iHelpMenu = _ cbMainMenuBar.Controls("Help").Index '(4)Add a Control to the "Worksheet Menu Bar" before Help. 'Set a CommandBarControl variable to it Set cbcCutomMenu = _ cbMainMenuBar.Controls.Add(Type:=msoControlPopup, _ Before:=iHelpMenu) '(5)Give the control a caption cbcCutomMenu.Caption = "&New Menu" '(6)Working with our new Control, add a sub control and _ give it a Caption and tell it which macro to run (OnAction). With cbcCutomMenu.Controls.Add(Type:=msoControlButton) .Caption = "Menu 1" .OnAction = "MyMacro1" End With '(6a)Add another sub control give it a Caption _ and tell it which macro to run (OnAction) With cbcCutomMenu.Controls.Add(Type:=msoControlButton) .Caption = "Menu 2" .OnAction = "MyMacro2" End With 'Repeat step "6a" for each menu item you want to add. 'Add another menu that will lead off to another menu 'Set a CommandBarControl variable to it Set cbcCutomMenu = cbcCutomMenu.Controls.Add(Type:=msoControlPopup) ' Give the control a caption cbcCutomMenu.Caption = "Ne&xt Menu" 'Add a contol to the sub menu, just created above With cbcCutomMenu.Controls.Add(Type:=msoControlButton) .Caption = "&Charts" .FaceId = 420 .OnAction = "MyMacro2" End With End Sub Sub DeleteMenu() On Error Resume Next Application.CommandBars("Worksheet Menu Bar").Controls("&New Menu").Delete On Error GoTo 0 End Sub Sub MyMacro1() MsgBox "I don't do much yet, do I?", vbInformation, "Ozgrid.com" End Sub Sub MyMacro2() MsgBox "I don't do much yet either, do I?", vbInformation, "Ozgrid.com" End Sub Private Sub Auto_Open() Run "AddMenus" End Sub Private Sub Auto_Close() Run "DeleteMenu" End Sub Report problem with this macro This macro does not work. There's an error in the code. Other You can write your comments about the error in the box below. Report error ALL MACROS Youtube Channel The following macros may be useful for you. Similar Results NoMacro Name 1 Create a user-defined menu / Create your own menu and assign a macro to them in the "Extensions" section 2 excel operators hk 3 Add menu to file edit bar delete 4 right mouse on active sheet / page menu 5 Create your own extensions and functions in excel 6 calculator on / off 7 excellent menu insert file menu print print preview sheet / page structure remains 8 deleting the menu bar and creating a custom menu 9 printing and prompting 10 sorts data and finds name 11 sorts data and finds name 12 add time as menu (most reliable) 13 add time as menu 14 dictionary codes 15 to the code section of the userform 16 Codes that prevent and open the vba window and access codes 17 Add Quick Access to custom Lists. Add custom List Access to the Right-Click Menu 18 specifies in detail how many references the book contains (on new sheet / page) 19 The title of your userform is + 20 The title of your userform is +