Я хочу иметь возможность копировать и вставлять фигуры из одного листа Excel в другой, не меняя его положение на этом листе. Следующий код позволяет мне копировать и вставлять фигуру из одного места в другое, но она меняет положение моей фигуры на
Set sh = WshSrc.Shapes("Rectangle 2")
For Each WshTrg In ThisWorkbook.Worksheets
If WshTrg.Name <> "Base" And WshTrg.Name <> "Format" Then
WshTrg.Cells.PasteSpecial xlPasteFormats
WshTrg.Cells.PasteSpecial xlPasteColumnWidths
WshTrg.Cells.PasteSpecial xlPasteFormulasAndNumberFormats
WshTrg.Cells.PasteSpecial xlPasteAll
End If
Next WshTrg
Set WshSrc = Nothing
For Each WshTrg In ThisWorkbook.Worksheets
If WshTrg.Name <> "Base" And WshTrg.Name <> "Format" Then
'sh.Name = WshSrc.Name & "_" & sh.Name
sh.Copy
WshTrg.Paste
End If
With sh
.Height = PasteCell.Height
.Width = PasteCell.Width
.Top = PasteCell.Top
.Left = PasteCell.Left
End With
Next WshTrg