anilsharaf
New Member
- Joined
- Apr 8, 2014
- Messages
- 43
- Office Version
- 2007
- Platform
- 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
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