Dim a As String For Each controlc In Form1.Controls If TypeOf controlc Is TextBox Then Me.Enabled = True a = controlc.Name MsgBox controlc.Text MsgBox a End If Next