返回列表 上一主題 發帖

[發問] 如何為shapes 命名

回復 3# user999

應該在一開始create shape時就把name設定好,之後就可以用name來access shape,如下,

        With ActiveSheet.Shapes.AddShape(msoShapeRectangle, xbeg_075, ybeg_075, width_075, height_075)
                .Name = ''你取的名字"
                .Placement = xlFreeFloating
                .Line.Weight = 0
                .Fill.ForeColor.RGB = RGB(255, 255, 255)
        End With
   
Activesheet.shapes(''你取的名字") 就會是你要的shape,
提醒你 shape name 的字數最多只能 31 字。


BR,
Jarod

TOP

        靜思自在 : 人事的艱難與琢磨,就是一種考驗。
返回列表 上一主題