mercredi 4 décembre 2019

Looping throught Active X controls and setting properties

Every time I run this code does not dissimulate between a option button and a checkbox. I placed a msgbox within the code and it came up to a optionbuton and showed up under the code for checkbox, In fact the code never shows up under active control code for the option button at all as I run through as a test I must be missing something.


Dim oleObj As OLEObject

For Each oleObj In Sht.OLEObjects
    Select Case True
        Case TypeOf oleObj.Object Is MSForms.CheckBox
            MsgBox oleObj.Name
            ResetActiveXCheckBox oleObj.Object

        Case TypeOf oleObj.Object Is MSForms.OptionButton
            ReSetActiveXOption oleObj.Object

    End Select
Next```







Aucun commentaire:

Enregistrer un commentaire