小编Meu*_*ult的帖子

不使用SELECT插入形状

我的一段代码遍历一系列单元格,如果某个单元格满足某些条件,则在该单元格中插入形状.它有效,但我想找到一种避免的替代方法select.

'above - code to find satisfying cell
ActWS.Activate       'Activate Sheet
ActWS.Cells(rActPlan - 1, vReturnColumn).Select 'Select satisfying cell
ActiveSheet.Shapes.AddShape(msoShapeOval, ActiveCell.Left, ActiveCell.Top, ActiveCell.Width, ActiveCell.Height).Select
Selection.ShapeRange.Fill.Visible = msoFalse
 With Selection.ShapeRange.Line
        .Visible = msoTrue
        .ForeColor.RGB = RGB(0, 255, 0)
        .Weight = 2.25
 End With
Run Code Online (Sandbox Code Playgroud)

excel vba excel-vba

4
推荐指数
1
解决办法
288
查看次数

标签 统计

excel ×1

excel-vba ×1

vba ×1