S
Sige
Hi There,
I would like to set a "picture" on a Subitem ... but I bug on:
"PasteFace"!
===> Method PasteFace of object "CommandBarButton" failed!
Using XL97SR2 - I cannot use PasteFace method on Subitems?
Any Ideas?
Sige
Sub AddShortCuts()
Dim cb As CommandBar, Item As CommandBarControl, Subitem As Object
ThisWorkbook.Sheets(1).Pictures("Picture 8").Copy
Set cb = Application.CommandBars("Cell")
'item
Set Item = cb.Controls.Add(Type:=msoControlPopup,temporary:=True)
With Item
.BeginGroup = True
.Caption = "Sige View..."
End With
'sub-items
Set Subitem = Item.Controls.Add(Type:=msoControlButton,
temporary:=True)
With Subitem
.BeginGroup = False
.Caption = "Clean"
.OnAction = "Trim"
.PasteFace
End With
End Sub
I would like to set a "picture" on a Subitem ... but I bug on:
"PasteFace"!
===> Method PasteFace of object "CommandBarButton" failed!
Using XL97SR2 - I cannot use PasteFace method on Subitems?
Any Ideas?
Sige
Sub AddShortCuts()
Dim cb As CommandBar, Item As CommandBarControl, Subitem As Object
ThisWorkbook.Sheets(1).Pictures("Picture 8").Copy
Set cb = Application.CommandBars("Cell")
'item
Set Item = cb.Controls.Add(Type:=msoControlPopup,temporary:=True)
With Item
.BeginGroup = True
.Caption = "Sige View..."
End With
'sub-items
Set Subitem = Item.Controls.Add(Type:=msoControlButton,
temporary:=True)
With Subitem
.BeginGroup = False
.Caption = "Clean"
.OnAction = "Trim"
.PasteFace
End With
End Sub