vba-利用me给控件赋值

Private Sub UserForm_Initialize()
    Dim arr, brr
    arr = Array("t_Name")
    brr = Array("张三")
    
    
    For i = 0 To UBound(arr)
        Debug.Print arr(i)
        Me.Controls(arr(i)).Text = brr(i)
    Next
End Sub

 

posted @ 2022-12-06 20:49  vba是最好的语言  阅读(194)  评论(0编辑  收藏  举报