PC Review


Reply
Thread Tools Rate Thread

Copying and Pasting a picture from one sheet to another

 
 
lostandcondfused
Guest
Posts: n/a
 
      19th Nov 2008
I need to copy a picture from one sheet to another sheet using VBA. I seem to
set an error message each time I try to do this. I have tried Shape.Copy but
it gives me an error message in regards to the object. And I have tried
Shape.CopyPicture. For some reason it doesnt recognize the "Shape" Object. I
am new to this and been using the help menu but nothing seems to work. Any
suggestions?
 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      19th Nov 2008
Try code like the following:

Sub AAA()
Dim Pict As Excel.Picture
Set Pict = Worksheets("Sheet2").Pictures("PictureName")
Pict.CopyPicture
Worksheets("Sheet1").Range("C10").PasteSpecial
End Sub


Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Wed, 19 Nov 2008 13:36:06 -0800, lostandcondfused
<(E-Mail Removed)> wrote:

>I need to copy a picture from one sheet to another sheet using VBA. I seem to
>set an error message each time I try to do this. I have tried Shape.Copy but
>it gives me an error message in regards to the object. And I have tried
>Shape.CopyPicture. For some reason it doesnt recognize the "Shape" Object. I
>am new to this and been using the help menu but nothing seems to work. Any
>suggestions?

 
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
Copying & pasting text and picture to a blank word document Al. Microsoft Word Document Management 3 12th Apr 2009 01:01 PM
how pdf picture appears when copying and pasting one sheet to anot =?Utf-8?B?ZmFyb29x?= Microsoft Excel Misc 0 25th Sep 2006 08:44 PM
copying and pasting from source sheet to destination sheet without naming source sht? Simon Lloyd Microsoft Excel Programming 5 2nd Jun 2006 06:11 PM
Copying and Pasting from One Sheet to Another =?Utf-8?B?UmF5UmVkU294RmFu?= Microsoft Excel Setup 1 1st Nov 2005 12:50 AM
Problem pasting a row from a hidden sheet to the first free row on another visible sheet Didier Poskin Microsoft Excel Programming 2 10th Jan 2004 01:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:11 PM.