How do I use variables to set properties in VBA (Excel)

前端 未结 3 988
轮回少年
轮回少年 2020-11-29 09:27

Take this code:

With ActiveSheet.Shapes.AddShape(msoShapeRectangle, x, y, w, h).TextFrame
  .Parent.Line.Visible = False
  .Parent.Fill.ForeColor.RGB = RGB(r         


        
3条回答
  •  执念已碎
    2020-11-29 10:19

    You could try looking at CallByName, but I don't think it's going to do what you want (at least, not easily if you're going to want to evaluate multi-dot object/property references).

提交回复
热议问题