lundi 15 avril 2019

How do I uncheck/check all my checkboxes at once?

I have a screen with about 500 checkboxes on it. The first checkbox has to be able to uncheck/check all the others, which my current code does.

I'd like to know if I can make it any faster/instant. Because I'm currently using a For loop it takes a while before it is done.

This is my code:

Dim xCheckBox As CheckBox
For Each xCheckBox In Application.ActiveSheet.CheckBoxes
    If xCheckBox.Name <> Application.ActiveSheet.CheckBoxes("ToggleCheck").Name Then
        xCheckBox.Value = Application.ActiveSheet.CheckBoxes("ToggleCheck").Value
    End If
Next




Aucun commentaire:

Enregistrer un commentaire