What are the limitations that you have encountered?
What are the limitations that you have encountered?
HI all,
I tried copying a picture into the add in file i created and wrote a script to paste that picture as a button image every time the add-in opens (i.e. when excel is loaded after the add in is installed) . However, since the image is copied in the clipboard, whenever a user performs a first operation on a sheet as "paste", the picture gets pasted in the current working (new)sheet. I'm looking for another way!
Also, since I need to install the add-in on multiple computers, I need to be able to change the image right in the source add-in file!
So maybe the solution is to clear the clipboard after pasting your image.
![]()
Private Declare Function EmptyClipboard Lib "user32" () As Long Private Declare Function CloseClipboard Lib "user32" () As Long Private Declare Function OpenClipboard Lib "user32" (ByVal hWnd As Long) As Long Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Sub ClearClipboard() Dim lngHWnd As Long lngHWnd = FindWindow("XLMAIN", Application.Caption) OpenClipboard lngHWnd EmptyClipboard CloseClipboard End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks