Hello All.
I have a "shape" on an Excel worksheet. I need to select this object and copy it within the same workbook but to a different sheet.
If I copy this object into cell A3 for example, I need the top left corner of the image to align exactly within the top left corner of the cell A3.
If I just use selection.paste into A3, then the top left corner of the image appears somewhere else within the cell A3.
I found out that if I insert the object in A3 as a GIF/JPEG file then the top left corner of the image is indeed flush with the top left corner of the cell A3. This I have achieved using Paste Special.
I recorded this macro and it produced:
ActiveSheet.PasteSpecial Format:="Picture (GIF)", Link:=False, DisplayAsIcon:=False
The problem is, however that this code doesn't work when I run it through the VBA editor. I get an error message "cannnot insert data".
Does anyone know how to help me ?
Thanks in advance, James.
I have a "shape" on an Excel worksheet. I need to select this object and copy it within the same workbook but to a different sheet.
If I copy this object into cell A3 for example, I need the top left corner of the image to align exactly within the top left corner of the cell A3.
If I just use selection.paste into A3, then the top left corner of the image appears somewhere else within the cell A3.
I found out that if I insert the object in A3 as a GIF/JPEG file then the top left corner of the image is indeed flush with the top left corner of the cell A3. This I have achieved using Paste Special.
I recorded this macro and it produced:
ActiveSheet.PasteSpecial Format:="Picture (GIF)", Link:=False, DisplayAsIcon:=False
The problem is, however that this code doesn't work when I run it through the VBA editor. I get an error message "cannnot insert data".
Does anyone know how to help me ?
Thanks in advance, James.