LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Copy & paste image from UserForm

Hi pmartin,
You can try:

Private Declare Function OpenClipboard& _
Lib "user32" (ByVal hwnd&)
Private Declare Function EmptyClipboard& _
Lib "user32" ()
Private Declare Function SetClipboardData& _
Lib "user32" (ByVal wFormat&, ByVal hMem&)
Private Declare Function CloseClipboard& _
Lib "user32" ()

Private Sub Image1_MouseDown(ByVal Button% _
, ByVal Shift%, ByVal X!, ByVal Y!)
If Button = 2 Then
On Error GoTo Bug
Application.CommandBars.FindControl(ID:=809).Execu te
Dim hCopy&
OpenClipboard 0&
EmptyClipboard
hCopy = SetClipboardData(2, Me.Image1.Picture.Handle)
CloseClipboard
Me.Image1.Picture = LoadPicture("")
Me.Repaint
End If
Bug:
End Sub

MP

a écrit dans le message de news:
...
Hi all

Is there an easy way to enable cut & paste from an image on a UserForm
(to another app, say Word). I have an Image control that displays a
chart GIF. I would like the user to be able to right-click and cut &
paste in the usual Windows manner. Are there some APIs that enable
this?

Thanks in advance

Paul Martin
Melbourne, Australia



 
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
Copy and paste an image Bill Excel Discussion (Misc queries) 3 May 6th 10 12:29 PM
How to embed an image withon a cell as opossed to copy and paste Karla Rodriguez Charts and Charting in Excel 3 November 4th 05 03:01 PM
copy shape image into image control Luc Benninger Excel Programming 2 July 15th 04 11:14 AM
Copy image of UserForm to a clipboard Gabor Excel Programming 3 July 14th 04 10:39 PM
copy-paste in a userform Hatzipavlis Stratos Excel Programming 2 November 13th 03 10:24 AM


All times are GMT +1. The time now is 12:58 PM.

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

About Us

"It's about Microsoft Excel"