i got the following code which pastes a range from a sheet to same sheet.
Sub copyPic()
Dim targetSheet As Worksheet
Set targetSheet = Sheets("Sheet1")
With targetSheet
.Range("A1:B10") .CopyPicture
.Paste
Selection.Name = "pastedPic"
With .Shapes("pastedPic")
.Top = targetSheet.Cells(5, 5).Top
.Left = targetSheet.Cells(5, 5).Left
.Width = 50
.Height = 50
End With
End With
End Sub
I would like to paste the "pastedPic" to a Workbook("masterfile.xlsm").Sheets("Page1") to a range which i select and if this does not work then i would like to specify the cells as i did in my code, but this time in another workbook and another worksheet. The workbook that i want to past is already open.
What should i do ?
WorkBook
– Jean-Pierre Oosthuizen