samedi 8 janvier 2022

Dynamically created CheckBox issue

Excel 2003

I create controls as required on a form with the control set to an array of specific control type, the TextBox and ComboBox controls work fine, but

when I try to use the change property to select if a checkbox has been selected it does not work.

I have tried TBox1_change() but no go

all code below is within a form called UForm1

Private Chk_Box(MxChkBx) As Control

Private Function Set_CheckBox(Num As Integer) As Integer
Set Chk_Box(Num) = uform1.Controls.Add("forms.checkbox.1", "CBox" & Num, True)
end Function

Private Sub CBox1_Change()
Call Set_AskCbox(1) ' Set_AskCbox() controls what happens when a checkbox is selected.
End Sub




Aucun commentaire:

Enregistrer un commentaire