PC Review


Reply
Thread Tools Rate Thread

Copy Image using VBA

 
 
linyang610@gmail.com
Guest
Posts: n/a
 
      19th Mar 2007
Hi there,

I am trying to programatically copy a picture from one Excel worksheet
to another in a same workbook, but don't know how.

I found a piece of code from this newsgroup that shows how to copy a
picture from outside of the workbook, but not within.

Range("D2").Select
ActiveSheet.Pictures.Insert ("C:\Pic1")

Can someone please advice?


Thank you for your help!

Lin

 
Reply With Quote
 
 
 
 
okrob
Guest
Posts: n/a
 
      19th Mar 2007
On Mar 19, 1:17 pm, linyang...@gmail.com wrote:
> Hi there,
>
> I am trying to programatically copy a picture from one Excel worksheet
> to another in a same workbook, but don't know how.
>
> I found a piece of code from this newsgroup that shows how to copy a
> picture from outside of the workbook, but not within.
>
> Range("D2").Select
> ActiveSheet.Pictures.Insert ("C:\Pic1")
>
> Can someone please advice?
>
> Thank you for your help!
>
> Lin


Do you just have one picture? If so, this should work. If you have
more than one pic, you should record a macro for the copy portion then
just use the second line of this to paste your pic...

ActiveSheet.Pictures.Copy
Sheets("Sheetnamehere").Range("D2").PasteSpecial

 
Reply With Quote
 
linyang610@gmail.com
Guest
Posts: n/a
 
      19th Mar 2007
Thank you! It works!

Lin
On Mar 19, 1:35 pm, "okrob" <merobwhoare...@yahoo.com> wrote:
> On Mar 19, 1:17 pm, linyang...@gmail.com wrote:
>
>
>
>
>
> > Hi there,

>
> > I am trying to programatically copy a picture from one Excel worksheet
> > to another in a same workbook, but don't know how.

>
> > I found a piece of code from this newsgroup that shows how to copy a
> > picture from outside of the workbook, but not within.

>
> > Range("D2").Select
> > ActiveSheet.Pictures.Insert ("C:\Pic1")

>
> > Can someone please advice?

>
> > Thank you for your help!

>
> > Lin

>
> Do you just have one picture? If so, this should work. If you have
> more than one pic, you should record a macro for the copy portion then
> just use the second line of this to paste your pic...
>
> ActiveSheet.Pictures.Copy
> Sheets("Sheetnamehere").Range("D2").PasteSpecial- Hide quoted text -
>
> - Show quoted text -



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy shape image into image control Luc Benninger Microsoft Excel Programming 3 21st Feb 2011 10:17 PM
Copy Image rap43 Microsoft Powerpoint 1 20th Feb 2008 10:15 PM
Image Copy msnews Microsoft Dot NET 1 19th Oct 2005 04:53 PM
Ghost copy or image copy of my drive question Aslaner Windows XP Help 3 13th Oct 2004 01:44 PM
Copy Image Pele Windows XP Basics 6 30th Mar 2004 10:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:22 AM.