M
Mocha
Hello everyone,
My name is Yogi. Could anyone help me, how to create custom menu (in menu
bar) with Ms Project profesional 2007 VBA that can execute macro.
Cause i tried this, but in MenuItem.OnAction step procedure raise an error
"AutomationError Unsprcified error".
Rod Gill give me advice to create menu from View-> toolber->Customize and
record that activity but the recorded macro didn't recorded anything.
Thank you so much.
Here is my VBA Macro that raised an error:
Dim MenuObject As CommandBarPopup
Dim MenuItem As Object
Warne = "Warn"
Set MenuObject = Application.CommandBars(1). _
Controls.Add(Type:=msoControlPopup, _
Before:=11, _
Temporary:=True)
MenuObject.Caption = "&Extra Menu"
Set MenuItem = MenuObject.Controls.Add(Type:=msoControlButton, ID:=1)
MenuItem.OnAction = "macro_proecedure"
MenuItem.Caption = "Report Summary"
sub macro_procedure()
MsgBox "Helllooo"
end sub
My name is Yogi. Could anyone help me, how to create custom menu (in menu
bar) with Ms Project profesional 2007 VBA that can execute macro.
Cause i tried this, but in MenuItem.OnAction step procedure raise an error
"AutomationError Unsprcified error".
Rod Gill give me advice to create menu from View-> toolber->Customize and
record that activity but the recorded macro didn't recorded anything.
Thank you so much.
Here is my VBA Macro that raised an error:
Dim MenuObject As CommandBarPopup
Dim MenuItem As Object
Warne = "Warn"
Set MenuObject = Application.CommandBars(1). _
Controls.Add(Type:=msoControlPopup, _
Before:=11, _
Temporary:=True)
MenuObject.Caption = "&Extra Menu"
Set MenuItem = MenuObject.Controls.Add(Type:=msoControlButton, ID:=1)
MenuItem.OnAction = "macro_proecedure"
MenuItem.Caption = "Report Summary"
sub macro_procedure()
MsgBox "Helllooo"
end sub