VBA清除所有Textbox

Private Sub CommandButton2_Click()
    Dim c
    For Each c In UserForm2.Controls
        If TypeName(c) = "TextBox" Then c.Text = ""
    Next
End Sub

资料来源https://zhidao.baidu.com/question/488665369140560212.html

 

posted @ 2023-08-18 14:41  tec2019  阅读(127)  评论(0编辑  收藏  举报