![]() |
setting FaceID problem
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 |
setting FaceID problem
J,
The -msoControlPopup- control doesn't have a style or faceid property. Jim Cone San Francisco, USA "Gixxer_J_97" 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 |
setting FaceID problem
thanks Jim! That would be why it wouldn't work =)
J "Jim Cone" wrote: J, The -msoControlPopup- control doesn't have a style or faceid property. Jim Cone San Francisco, USA "Gixxer_J_97" 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 |
All times are GMT +1. The time now is 02:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com