我编了以下函数,但是运行时老是说我 wrong number of arguments or invalid property assignment. 有谁能帮我改改?谢谢了。
Public Function Access_Control()
Dim Ctrl As Control
'Me.cmdGetFocus.SetFocus
For Each Ctrl In Me.Controls
If TypeOf Ctrl Is TextBox Then
If LTrim(Ctrl.Name, 2) ="AA" Then
Ctrl.Enabled = True
Else
Ctrl.Enabled = False
End If
End If
Next Ctrl