我需要遍历一组控件名称来更改其sendRawEmail()
值。
这是我尝试过的:
TabIndex
...但这给了我错误:Dim ctls As Variant
Dim i As Variant
ctls = Array("Text2")
For Each i In ctls
i.TabIndex = 1
Next
。如何将数组元素识别为对象?
答案 0 :(得分:0)
Dim ctrl As Control
For Each ctrl In Me.Controls
ctrl.TabIndex = 1
Next