Macro to copy picture image from one worksheet to another

Swifey

Active Member
Joined
Jan 16, 2003
Messages
421
Hi could you please help me I’m copying a picture image from one worksheet to another via a macro. When I do it manually it works fine but when I rum my code the picture image is not there.

My code is as follows

'Sheets("Sheet3").Select
'ActiveSheet.Shapes("Picture 1").Select
'Selection.Copy
'Worksheets(1).Activate
'Range("A1").Select
'ActiveSheet.Paste
'Range("D9").Select
'Sheets("Sheet3").Select
'Range("B16").Select
'Sheets("Sheet3").Select
'ActiveWindow.SelectedSheets.Delete
'Range("A11").Select
'Worksheets(1).Activate

Swifey
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Re: Macro to copy picture image from one worksheet to anothe

This worked for me:

Code:
Sub Test()
    Worksheets("Sheet3").Shapes("Picture 1").Copy
    Worksheets(1).Paste Range("A1")
End Sub
 
Upvote 0
Re: Macro to copy picture image from one worksheet to anothe

I'm sorry but I cant get it to work. I applied your code but the Logo still dosnt appear on the sheet.

Regards
Swifey
 
Upvote 0
Re: Macro to copy picture image from one worksheet to anothe

Can I suggest you turn on the Macro recorder, copy the picture manually and have a look at the code? It should be similar to mine, except that selections are made.
 
Upvote 0
Re: Macro to copy picture image from one worksheet to anothe

The following is the system macro code. Which works when I run the macro.
But when I change "Sheets("Hill").Select" to "Worksheets(1).Activate" the logo dosnt come through - The reason why I use this code is because the worksheet name is different everytime.

Sheets("Sheet3").Select
ActiveSheet.Shapes("Picture 1").Select
Selection.Copy
Sheets("Hill").Select
Range("A1").Select
ActiveSheet.Paste
Selection.ShapeRange.IncrementLeft -0.75
Selection.ShapeRange.IncrementTop -8.25
Range("D10").Select

Regards
Lynda
 
Upvote 1
Re: Macro to copy picture image from one worksheet to anothe

If you run this:

MsgBox Worksheets("Hill").Index

what number does it return?
 
Upvote 0
Re: Macro to copy picture image from one worksheet to anothe

Thank you it works a treat - I can see now what the index returns.

Thank you once again
Swifey
 
Upvote 0

Forum statistics

Threads
1,215,053
Messages
6,122,888
Members
449,097
Latest member
dbomb1414

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