I have an Excel userform with dynamically added checkboxes.
I add the checkboxes with code that looks like this:
Set chkBox = Me.Controls.Add(\"Forms
Adding a check for the control seemed to fix this. Not entirely sure why, but it works.
Dim j As Integer
'Remove all dynamically updated checkboxes
For Each cont In Me.Controls
If TypeName(cont) = "CheckBox" Then
For j = 1 To NumControls
If cont.Name = "Checkbox" & j Then
Me.Controls.Remove cont.Name
Exit For
End If
Next j
End If
Next cont