?
Solved

Copy a Jpeg that is in an image control

Posted on 2003-02-26
3
Medium Priority
?
155 Views
Last Modified: 2010-05-01
I have a form with a number of image controls and what I want to do is provide a button the user can click to copy the currently selected image to the clipboard, they will then be able to paste the image into word etc. I would be very greatful for any help with this.

Lianne
0
Comment
Question by:Lianne072600
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 600 total points
ID: 8029838
Image1.Picture = LoadPicture("<path to picture>")
Clipboard.Clear
Clipboard.SetData Image1.Picture
0
 
LVL 5

Expert Comment

by:JohnMcCann
ID: 8029856
Private Sub Command1_Click()
   Clipboard.SetData Picture1.Picture
End Sub
0
 
LVL 1

Author Comment

by:Lianne072600
ID: 8040407
Thats brilliant thanks a lot. The reason I have accepted Bobbits comment as an answer is that it fitted in brilliantly with my code. I did try your comment John but it didn't work with my existing code, and it was easier to use Bobbits method than try to modify my code to get it to work. But, thankyou for your comment.

Thanks again.

Lianne
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question