View Single Post
 
Old 08-10-2017, 07:42 AM
billcorb billcorb is offline Windows 10 Office 2016
Novice
 
Join Date: Aug 2017
Posts: 3
billcorb is on a distinguished road
Exclamation 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.
Reply With Quote