2,463
社区成员
发帖
与我相关
我的任务
分享
Sub test()
Dim s1 As Shape
Dim s2 As Shape
Dim w As Worksheet
Dim tl As Range
Dim br As Range
Set w = ThisWorkbook.Sheets("test")
Set s1 = w.Shapes("图表 2")
Set s2 = w.Shapes.AddShape(msoShapeRectangle, s1.Left + s1.Width, s1.Top + s1.Height, 20, 20)
Set br = s2.TopLeftCell
Set tl = s1.TopLeftCell
s2.Delete
MsgBox "图表区域为:" & tl.Address & ":" & br.Address
End Sub