mardi 12 novembre 2019

Edit properties ActiveX CheckBox VBA Excel

I'm trying to add a new CheckBox when the "Sensitive data" checkbox is checked and have the same height and width as the others.

I've just see this answer and it works, the code adds a new checkbox, but its like below

this

I want the "Checkbox" to have a name, like chkPCI, and the caption "PCI", I've tried the following code, but adds a form control, and not an ActiveX control.

    ActiveSheet.CheckBoxes.Add(Cells(10, "A").Left, _
                            Cells(10, "A").Top, _
                            72, 17.25).Select
    With Selection
        .Caption = "PCI"
        .Value = xlOff '
        .Display3DShading = False
    End With



Aucun commentaire:

Enregistrer un commentaire