setting FaceID problem

G

Guest

Hi all,
i'm getting an 'object doesn't support this property or method' error when
the code runs.
it's erroring on the '.style=' line in the 'with NewMenu' section

not sure what i'm missing....

i'm using the following code to create my custom toolbar:

With Application
.ScreenUpdating = False
Arr1 = Array("Save Order", "Open Order", "Cancel Order", "Reset
Order", "Print..")
Arr2 = Array("SaveOrder", "OpenOrder", "CancelOrder", "ResetOrder",
"PrintDocuments")
Arr3 = Array(100, 101, 102, 103, 104)
Set CBAR = .CommandBars.Add("Tool Box", temporary:=True)
Set NewMenu = CBAR.Controls.Add(msoControlPopup)
With NewMenu
.Caption = "Order Tools"
.TooltipText = "Order Entry Tools"
'.Style = msoButtonIconAndCaption
'.FaceId = 100
End With
For i = 0 To UBound(Arr1)
Set MenuItm = NewMenu.Controls.Add
With MenuItm
.Caption = Arr1(i)
.Style = msoButtonIconAndCaption
.OnAction = Arr2(i)
.FaceId = Arr3(i)
.Width = widths
End With
Next
CBAR.Visible = True
DoEvents
.ScreenUpdating = True
End With

tia!

J
 
J

Jim Cone

J,
The -msoControlPopup- control doesn't have a style or faceid property.
Jim Cone
San Francisco, USA


"Gixxer_J_97"
<[email protected]>
wrote in message
Hi all,
i'm getting an 'object doesn't support this property or method' error when
the code runs.
it's erroring on the '.style=' line in the 'with NewMenu' section
not sure what i'm missing....
i'm using the following code to create my custom toolbar:
With Application
.ScreenUpdating = False
Arr1 = Array("Save Order", "Open Order", "Cancel Order", "Reset
Order", "Print..")
Arr2 = Array("SaveOrder", "OpenOrder", "CancelOrder", "ResetOrder",
"PrintDocuments")
Arr3 = Array(100, 101, 102, 103, 104)
Set CBAR = .CommandBars.Add("Tool Box", temporary:=True)
Set NewMenu = CBAR.Controls.Add(msoControlPopup)
With NewMenu
.Caption = "Order Tools"
.TooltipText = "Order Entry Tools"
'.Style = msoButtonIconAndCaption
'.FaceId = 100
End With
For i = 0 To UBound(Arr1)
Set MenuItm = NewMenu.Controls.Add
With MenuItm
.Caption = Arr1(i)
.Style = msoButtonIconAndCaption
.OnAction = Arr2(i)
.FaceId = Arr3(i)
.Width = widths
End With
Next
CBAR.Visible = True
DoEvents
.ScreenUpdating = True
End With
tia!
J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top