Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在特殊粘贴后设置形状名称?
这是我的代码。
With Sheets("sheet1") .Shapes("testpic").Copy .PasteSpecial Format:=xlBitmap End With
如何设置新图片的名称,以及位置(.top,.left等)
添加形状时,它的索引最高,因此:
Sub CopyShape() Dim ws As Excel.Worksheet Set ws = Sheets("sheet1") With ws .Shapes("testpic").Copy .PasteSpecial Format:=xlBitmap With .Shapes(.Shapes.Count) .Name = "myName" .Top = 100 'etc. End With End With End Sub