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.
我在工作表中使用以下代码对形状进行了分组
Activesheet.drawing objects.Group
现在我想重命名组名,但找不到代码。
我尝试了以下方法:
Set shpGroup = ActiveSheet.Shapes(Application.Caller) shpGroup.ParentGroup.Name = "MyGroup"
也尝试了以下
Activesheet.group.select selection.name = "MyGroup"
谢谢
您可以参考 GroupObjects 集合。以下代码将命名您分组的最后一组形状...
With ActiveSheet .GroupObjects(.GroupObjects.Count).Name = "MyGroup" End With