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

anilsharaf

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

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,424
Messages
5,837,155
Members
430,479
Latest member
mamush200

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