G
Greg Glynn
Hi,
My code:
Sub AddPhotoPictureWithNAme()
' This Macro creates a picture element from the contents of a range, and names it
Dim Pct As Picture, Rng As Range, Shp as Shape
' Identify and copy the source
Set Rng = Range("B2:C6")
Rng.Copy
'
Set Pct = ActiveSheet.Pictures.Add(100, 100, 100, 100)
Pct.Name = "Project Clip"
For Each Shp In ActiveSheet.Shapes
Debug.Print Shp.Name
Next Shp
End Sub
.... runs till it gets to the 'Set Pct =' step then flops into debug, upon which I can then proceed without an error. I thought it might be a timing issue, but I'm not sure. Can anyone help?
Greg
My code:
Sub AddPhotoPictureWithNAme()
' This Macro creates a picture element from the contents of a range, and names it
Dim Pct As Picture, Rng As Range, Shp as Shape
' Identify and copy the source
Set Rng = Range("B2:C6")
Rng.Copy
'
Set Pct = ActiveSheet.Pictures.Add(100, 100, 100, 100)
Pct.Name = "Project Clip"
For Each Shp In ActiveSheet.Shapes
Debug.Print Shp.Name
Next Shp
End Sub
.... runs till it gets to the 'Set Pct =' step then flops into debug, upon which I can then proceed without an error. I thought it might be a timing issue, but I'm not sure. Can anyone help?
Greg