Hello there,
I am using a userform where i have my textboxes, comboboxes with a commandbutton.
When i click on that commandbutton, i would like to reset all the textboxes except one of them.
Currently i am using the following code i got from the internet. But how can I have one of my textboxes unchanged on the userform?
Private Sub cmdAdd_Click()
Dim cCont As Control
For Each cCont In Me.Controls
If TypeName(cCont) = "ComboBox" Then
cCont.Value = ""
End If
If TypeName(cCont) = "TextBox" Then
cCont.Value = ""
End If
If TypeName(cCont) = "Label" Then
cCont.Value = ""
End If
Next cCont
End Sub
Thanks
gkisacik
Bookmarks