Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2017, 07:42 AM
billcorb billcorb is offline Custom command bar coontrol Windows 10 Custom command bar coontrol Office 2016
Novice
Custom command bar coontrol
 
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
  #2  
Old 08-10-2017, 10:55 AM
billcorb billcorb is offline Custom command bar coontrol Windows 10 Custom command bar coontrol Office 2016
Novice
Custom command bar coontrol
 
Join Date: Aug 2017
Posts: 3
billcorb is on a distinguished road
Default 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
Reply With Quote
Reply

Tags
combobox, custom control, findcontrol



Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom command bar coontrol 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

Other Forums: Access Forums

All times are GMT -7. The time now is 07:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft