Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default PasteFace issue

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:=T rue)
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default PasteFace issue

I tried your code in Excel 97 SR-2(n) and it ran fine. I used an image I
copied from another toolbutton so I know it's okay on a toolbutton. Does
you image paste okay manually?

--
Jim

"Sige" wrote in message
oups.com...
| 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:=T rue)
| 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
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default PasteFace issue

Yes Jim ...it was no issue at all....
I inserted a picture by InsertPictureFromFile...
But no matter what picture I use... my PasteFace returns the error. Not
the faintest idea why.


Sige

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
same issue Dink Charts and Charting in Excel 1 October 3rd 09 10:40 AM
I believe that this is a set up issue... jsylvester Setting up and Configuration of Excel 2 January 21st 09 06:41 PM
Issue with zero/# issue!! drvortex Excel Worksheet Functions 4 December 6th 05 06:22 PM
Fuzzy icons from PasteFace Tony Rizzo[_2_] Excel Programming 2 August 21st 05 03:11 AM
PasteFace-Problem Tom Excel Programming 1 January 15th 04 04:55 PM


All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"