Copying and Pasting a picture from one sheet to another

L

lostandcondfused

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?
 
C

Chip Pearson

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top