+ Reply to Thread
Results 1 to 5 of 5

PasteFace issue

Hybrid View

  1. #1
    Sige
    Guest

    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:=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


  2. #2
    Jim Rech
    Guest

    Re: 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" <SIGE_GOEVAERTS@HOTMAIL.COM> wrote in message
    news:1128693364.418813.263420@g43g2000cwa.googlegroups.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:=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
    |



  3. #3
    Sige
    Guest

    Re: PasteFace issue

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


    Sige


  4. #4
    Jim Rech
    Guest

    Re: PasteFace issue

    Just curious. Clicking the button on the attached errors?



    --
    Jim
    "Sige" <SIGE_GOEVAERTS@HOTMAIL.COM> wrote in message
    news:1128696908.556192.291170@g44g2000cwa.googlegroups.com...
    | Yes Jim ...it was no issue at all....
    | I inserted a picture by Insert>Picture>FromFile...
    | But no matter what picture I use... my PasteFace returns the error. Not
    | the faintest idea why.
    |
    |
    | Sige
    |





  5. #5
    SIGE
    Guest

    Re: PasteFace issue

    What do you mean Jim?

    "NOSPAM" to be removed for direct mailing...

    *** Sent via Developersdex http://www.developersdex.com ***

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1