如何循环多个文本框以设置透明度

时间:2019-05-22 20:56:36

标签: excel vba

我正在尝试使用VBA在多个文本框中将透明度级别设置为60%。我正在使用以下代码循环TextBox 100-149,执行时遇到运行时错误The item with the specified name was not found,该如何解决?

Sub set_Transparency()
Dim x As Integer
For x = 100 To 149
With Sheet5.Shapes("TextBox" & x)
    With .TextFrame2.TextRange.Characters
        With .Font.Fill
.ForeColor.RGB = RGB(255, 255, 255)
.Transparency = 0
    End With
        End With
End With
    Next x
End Sub

1 个答案:

答案 0 :(得分:2)

$_FILES['my_file']