clear clipboard after Add-ins Toolbar creation

  • Thread starter Thread starter Kyoux
  • Start date Start date
K

Kyoux

Hello,
I've an add-ins that creates a new toolbar each time a new
workbook has been opened. I put personalized pictures on
the buttons by copy-pasteface them from one worksheet. The
problem is that the clipboard keeps them so that when
opening a new book, if I want to paste something, it paste
the latest picture from the clipboard.
Set Icon = OEProject.Sheet1
Icon.Shapes("Picture 50").Copy
MyButton.PasteFace
I saw the function Clipboard.Clear on the Net
but "Clipboard" is unknown in my VBA, even in the
ObjectBrowser.
I really don't know how to fix this, could anyone help?
 
It does not solve anything because now, the clipboard has
an empty cell (so once it is pasted, it overwrite the
rest).
Isn't there a way to empty the clipboard by VBA code?
 
How about this:

Range("a1").Copy
Application.CutCopyMode = False

When I added that extra line, the paste option was gone from the rightclick
menu.

But if I only had application.cutcopymode = false, then it was still enabled.
 
Back
Top