VBA:移动文本框 修改文本框背景颜色 修改文本框中的文本
‘移动文本框
Sub ydwbb(aa, xx, yy) ab = "TextBox " & aa With ActiveSheet.Shapes(ab) .Select .Left = xx .Top = yy End With End Sub
’修改文本框背景颜色 文本框文字内容
Sub yanselan(aa) ab = "TextBox " & aa Set p3 = ActiveSheet.Shapes(ab) p3.Fill.ForeColor.RGB = RGB(0, 112, 192) p3.TextFrame2.TextRange.Text = "1" End Sub Sub yansehong(aa) ab = "TextBox " & aa Set p3 = ActiveSheet.Shapes(ab) p3.Fill.ForeColor.RGB = RGB(255, 0, 0) p3.TextFrame2.TextRange.Text = "0" End Sub