Use the TextBox Tag Property, give the TextBox to exclude a value then this code will work
![]()
Option Explicit Private Sub cmdAdd_Click() Dim cCont As msforms.Control For Each cCont In Me.Controls With cCont Select Case TypeName(cCont) Case "ComboBox": .Value = "" Case TypeName(cCont) = "TextBox" If .Tag <> "" Then .Value = "" Case "Label": .Caption = "" End Select End With Next cCont End Sub
Bookmarks