I have a sprite sheet with country flags and code that puts the shape of a flag in each cell of a selection with two letter country codes. This works well if i .Addpicture from an external .png file for each cell. When i try to put the .png in an auxiliary sheet and .Duplicate flags from it, the flags are created in the sheet where the spritesheet is, no matter what I try. Stripped example below
How Can I .Duplicate a shape in a different Sheet?
Dim sh,shf as shape
dim is as range
Dim ws As Worksheet: Set ws = ActiveSheet
Set shf = Worksheets("flags").Shapes("flags")
ws.Activate
...
For each i in Selection.Cells
'get country code and calculate offsets
Set sh = shf.Duplicate 'this puts the shape in the flags sheet
....