How to Fine Tune this code to make a new Ribbon Command in Xl 2007

anilsharaf

New Member
Joined
Apr 8, 2014
Messages
43
Office Version
  1. 2007
Platform
  1. Windows
I studied Mr.xl Book and made A toolbar and menu bar and added macro commands to it. But it shows the name of Command group as " add in" in Xl Ribbon. I want this label to show as "ExamSolutions"

File is here https://app.box.com/s/6eds2l6kpbdghotg7dhfqyues3zstm4n

Code is placed in Workbook_open event

Private Sub Workbook_Open()
'Sub CreateMenuFourItems()
' Code from bottom of page 483, top of 484
Dim MenuObject As CommandBarPopup
Dim MenuItem As Object
Dim SubMenuItem As Object


' Make sure the menus aren't duplicated
Call DeleteMenu


Set MenuObject = Application.CommandBars(1). _
Controls.Add(Type:=msoControlPopup, _
Before:=10, Temporary:=True)
MenuObject.Caption = "&Exam"


Set MenuItem = MenuObject.Controls.Add(Type:=msoControlButton)
MenuItem.OnAction = "Divsn"
MenuItem.Caption = "&Division"

Set MenuItem = MenuObject.Controls.Add(Type:=msoControlButton)
MenuItem.OnAction = "PositionInClassInAnvlExam"
MenuItem.Caption = "&PositionInClassInAnvlExam"


Set MenuItem = MenuObject.Controls.Add(Type:=msoControlButton)
MenuItem.OnAction = "supplemntry_V2"
MenuItem.Caption = "&supplemntry_V2"

'Set MenuItem = MenuObject.Controls.Add(Type:=msoControlButton)
'MenuItem.OnAction = "AboutMe"
'MenuItem.Caption = "Abou&t Program"
'End Sub
End Sub
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top