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

anilsharaf

New Member
Joined
Apr 8, 2014
Messages
21
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
 

Some videos you may like

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Watch MrExcel Video

Forum statistics

Threads
1,122,491
Messages
5,596,466
Members
414,069
Latest member
StudExcel

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
Top