G
Gordon Muir
As far as I can tell, the onAction property has intentionally been disabled
in Project 2007. Although it is possible to add buttons to a toolbar and
assign a macro using the GUI, I cannot find a way to do this from VBA for a
combo box (I have managed to figure it out for a button). The following code
used to work in 2003:
With customBar
Dim r As Resource
.Controls.Add Type:=msoControlComboBox, Before:=1
With .Controls(1)
For Each r In ActiveProject.Resources()
.AddItem r.Name
Next r
.BeginGroup = False
.Caption = "Show Resource"
.TooltipText = "Show tasks using Resource with Resource
Calendar"
.OnAction = "ShowResourceAction"
End With
.... but now, it does not work. Since there is a way to do this using the
"ID" and "Parameter" properties for buttons and other built-in components,
I'm hoping there is a way to make this work in 2007. On the other hand, I
guess this functionality has been disabled for a reason...
Anyone any ideas?
Thanks,
Gordon
in Project 2007. Although it is possible to add buttons to a toolbar and
assign a macro using the GUI, I cannot find a way to do this from VBA for a
combo box (I have managed to figure it out for a button). The following code
used to work in 2003:
With customBar
Dim r As Resource
.Controls.Add Type:=msoControlComboBox, Before:=1
With .Controls(1)
For Each r In ActiveProject.Resources()
.AddItem r.Name
Next r
.BeginGroup = False
.Caption = "Show Resource"
.TooltipText = "Show tasks using Resource with Resource
Calendar"
.OnAction = "ShowResourceAction"
End With
.... but now, it does not work. Since there is a way to do this using the
"ID" and "Parameter" properties for buttons and other built-in components,
I'm hoping there is a way to make this work in 2007. On the other hand, I
guess this functionality has been disabled for a reason...
Anyone any ideas?
Thanks,
Gordon