Hi everyone,
I am having having problems trying to clear the contents of two ListBoxes on a Userform.
It errors out on the line ctrl.Clear![]()
Dim ctrlType1 As String, ctrlType2 As String ctrlType1 = "TextBox" ctrlType2 = "ListBox" For Each ctrl In Userform2.Controls If TypeName(ctrl) = ctrlType1 Then ctrl.Value = "" ElseIf TypeName(ctrl) = ctrlType2 Then ctrl.Clear End If Next ctrl
Thanks for looking into this.
Bookmarks