#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
Command bars
I got it working now. I had to set the msocontrol to my command bar.
Set custBar = CommandBars("IMA-sch") Set Cbox = custBar.FindControl _ (Type:=msoControlComboBox, Tag:="Network Paths", Visible:=True, Recursive:=True) Cbox.Width = 36 |
Tags |
combobox, custom control, findcontrol |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is this command? | Turn-over | Word | 1 | 03-29-2017 08:10 AM |
Creating a key command to add a custom header and footer | GrantSaw | Word | 1 | 02-04-2015 07:46 AM |
Custom table of contents referencing a custom field | skaboy607 | Word | 3 | 01-16-2014 06:59 AM |
assigning custom templates to custom tab | rich_cirillo | Word | 0 | 10-18-2012 05:59 PM |
Add-In:How to add command right click command bar | phang | Outlook | 0 | 01-15-2007 02:53 AM |