Thank you for that. Unfortunately that wont work the way im trying to do it. Below is the code for when the checkboxes are changed. This is actually part of the userform. I am trying to get it so if a schedule is needed to change then it fills the right
combobox. Everything works except when i use a button to change the value. After clicking the button the activecontrol.name is going to be the button and not the checkbox. The way this is set up is that if i make any changes to one check box it will easily
be copied and pasted without trying to change the different variables for each box. Is there a way to get this code to run like it is below but it pulls the checkbox that it is under.
Private sub checkbox1_change()
dim ctrl as string
ctrl = activecontrol.name *this part doesnt work when using multiple controls to change the one control*
dim db as integer
db = right(ctrl,1)
Dim combo as string
dim cv as boolean
if me.controls(ctrl).value = true then
Cv = true
Combo1 = combo & (dn*3-2)
Me.controls(combo1).enabled = cv
Combo2 = combo & (dn*3-1)
Me.controls(combo2).enabled = cv
Combo3 = combo & (dn*3)
Me.controls(combo3).enabled = cv
else
Cv = true
Combo1 = combo & (dn*3-2)
Me.controls(combo1).enabled = cv
Combo2 = combo & (dn*3-1)
Me.controls(combo2).enabled = cv
Combo3 = combo & (dn*3)
Me.controls(combo3).enabled = cv
End if
end sub