D
Developer
Hello,
For some reason the following code stopped working in Project 2007 Beta2.
Have there been any changes in setting up the menu handlers?
Public Sub TestMenu()
Dim customBar As CommandBar
Dim newButton As CommandBarButton
Set customBar = CommandBars("Menu Bar")
customBar.Reset
Set mymenu = CommandBars("Menu Bar").Controls.Add(Type:=msoControlPopup,
Before:=7)
mymenu.caption = "My Menu"
Dim command As CommandBarButton
Set command = mymenu.Controls.Add
command.caption = "Say Hello"
command.OnAction = "msgbox ""Hello!"""
End Sub
For some reason the following code stopped working in Project 2007 Beta2.
Have there been any changes in setting up the menu handlers?
Public Sub TestMenu()
Dim customBar As CommandBar
Dim newButton As CommandBarButton
Set customBar = CommandBars("Menu Bar")
customBar.Reset
Set mymenu = CommandBars("Menu Bar").Controls.Add(Type:=msoControlPopup,
Before:=7)
mymenu.caption = "My Menu"
Dim command As CommandBarButton
Set command = mymenu.Controls.Add
command.caption = "Say Hello"
command.OnAction = "msgbox ""Hello!"""
End Sub