![]() |
Problem assinging FaceID to toolbar
I have this code, that fails when assinging the first faceID. If I
comment it out it works fine. The other faceID assign without a problem. With Application.CommandBars("Worksheet Menu Bar").Controls("Tools").Controls.Add(Type:=msoCont rolPopup) .Caption = conTopMenu .FaceId = 23 .BeginGroup = True With .Controls.Add(Type:=msoControlPopup) .Caption = "Formulas" 'Submenu With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conUnqCountSub .FaceId = conUnqCountFaceID .Caption = conUnqCountCaption End With With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conSPSub .FaceId = conSPFaceID .Caption = conSPCaption End With End With 'End Submenu With .Controls.Add(Type:=msoControlPopup) .Caption = "Formatting" 'Submenu With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conStdFmtSub .Caption = conStdFmtCaption End With End With 'End Submenu With .Controls.Add(Type:=msoControlPopup) .Caption = "Cell Manipulation" 'Submenu With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conClrAposSub .Caption = conClrAposCaption End With With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conResetLastCellSub .Caption = conResetLastCellCaption End With End With 'End Submenu With .Controls.Add .BeginGroup = True .OnAction = ThisWorkbook.FullName & "!" & conHelpSub .FaceId = conHelpFaceId .Caption = conHelpCaption End With With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conAboutSub .FaceId = conAboutFaceId .Caption = conAboutCaption End With End With |
Problem assinging FaceID to toolbar
w,
A msoControlPopup will not accept a face id. Take a look at the normal Excel menus. Menu items that contain sub menu items do not have icon. Jim Cone San Francisco, USA wrote in message oups.com I have this code, that fails when assinging the first faceID. If I comment it out it works fine. The other faceID assign without a problem. With Application.CommandBars("Worksheet Menu Bar").Controls("Tools").Controls.Add(Type:=msoCont rolPopup) .Caption = conTopMenu .FaceId = 23 .BeginGroup = True With .Controls.Add(Type:=msoControlPopup) .Caption = "Formulas" 'Submenu With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conUnqCountSub .FaceId = conUnqCountFaceID .Caption = conUnqCountCaption End With With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conSPSub .FaceId = conSPFaceID .Caption = conSPCaption End With End With 'End Submenu With .Controls.Add(Type:=msoControlPopup) .Caption = "Formatting" 'Submenu With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conStdFmtSub .Caption = conStdFmtCaption End With End With 'End Submenu With .Controls.Add(Type:=msoControlPopup) .Caption = "Cell Manipulation" 'Submenu With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conClrAposSub .Caption = conClrAposCaption End With With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conResetLastCellSub .Caption = conResetLastCellCaption End With End With 'End Submenu With .Controls.Add .BeginGroup = True .OnAction = ThisWorkbook.FullName & "!" & conHelpSub .FaceId = conHelpFaceId .Caption = conHelpCaption End With With .Controls.Add .OnAction = ThisWorkbook.FullName & "!" & conAboutSub .FaceId = conAboutFaceId .Caption = conAboutCaption End With End With |
Problem assinging FaceID to toolbar
Thanks. I thought I was losing it.
|
All times are GMT +1. The time now is 10:28 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com