clear clipboard after Add-ins Toolbar creation

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?
 
K

Kyoux

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?
 
D

Dave Peterson

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.

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?
-----Original Message-----
Try .. Range("A1").Copy



------------------------------------------------
[/url]
~~ View and post usenet messages directly from http://www.ExcelForum.com/

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top