Copy/Paste Pic Code Not Working

katk

Board Regular
Joined
Jul 21, 2009
Messages
62
Hello,

I have a workbook with one main sheet that has a bunch of formulas. I have a code that updates the information on that sheet, formats everything, and then copies and pastes the values and formats onto a new sheet which it creates.

One of the things I'm trying to copy and paste is a logo. It didn't transfer over when I told the code to copy/paste the entire sheet, so I tried adding an extra bit of code to deal specifically with the picture. Since writing the code kept giving me an error, I just recorded the macro of copy/pasting the picture -- only that's been giving me an error too. This is the recorded code:


Code:
Sub Piccy()
    ActiveSheet.Shapes.Range(Array("Picture 1")).Select
    Sheets("Sheet3").Select
    Range("D1").Select
    ActiveSheet.PasteSpecial Format:="Picture", Link:=False, DisplayAsIcon:= _ 
False
End Sub

At first it was giving me an error saying it couldn't find the object in question, then an error saying it couldn't perform the action, and now it's actually not giving me an error anymore but it's pasting the code itself into D1 instead of the picture. Help?

Thanks, Katherine
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Note: I also tried changing ActiveSheet to Sheets("Rough Draft") [name of the copy-from sheet] in case that was contributing to the problem, but it didn't change anything...
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,853
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top