Custom command bar coontrol
I have been trying to resurrect code that worked on MS Project 98. The following code does not set the command combobox.
CommandBars.Add(Name:="IMA-sch").Visible = True
Set custBar = CommandBars("IMA-sch")
custBar.Visible = True
Set graphbtn = custBar.Controls.Add(Type:=msoControlButton)
graphbtn.FaceId = 419
graphbtn.Caption = "Sch-aid"
graphbtn.OnAction = "IMASCH_aid"
Set graphbtn = custBar.Controls.Add(Type:=msoControlButton)
graphbtn.FaceId = 7
graphbtn.Caption = "Rebuild Path List"
graphbtn.OnAction = "PthButBld"
Set graphbtn = custBar.Controls.Add(Type:=msoControlComboBox)
graphbtn.Caption = "Network Paths"
graphbtn.Tag = "Network Paths"
graphbtn.OnAction = "PthBut"
Set cmbx = custBar.FindControl _
(Type:=msoControlComboBox, Tag:="Network Paths", Visible:=True, Recursive:=True)
Cmbx is nothing.
Any suggestions will be greatly appreciated.
|