Dear reader,
I am writing a program to determine how to connect power cables to electric panels and a userform with a diagram and 36 checkboxes seems to build an excellent interface. I want to use the checkboxes in the diagram to let the program show me what to do.
The only thing I could come up with would look something like this:
checkbox1.value = false
checkbox2.value = false
'
'
'
etc
if condition1 =true then
checkbox1.value = true
end if
if condition2 =true then
checkbox2.value = true
end if
'
'
'
etc.
Now with 36 checkboxes this will be an awfull lot off code. I think there must be a shorter way of doing this and I think class modules are the key. I can´t figure out how though. Does anybody have a sugestion?
Thanks in advance. Jokko
I am writing a program to determine how to connect power cables to electric panels and a userform with a diagram and 36 checkboxes seems to build an excellent interface. I want to use the checkboxes in the diagram to let the program show me what to do.
The only thing I could come up with would look something like this:
checkbox1.value = false
checkbox2.value = false
'
'
'
etc
if condition1 =true then
checkbox1.value = true
end if
if condition2 =true then
checkbox2.value = true
end if
'
'
'
etc.
Now with 36 checkboxes this will be an awfull lot off code. I think there must be a shorter way of doing this and I think class modules are the key. I can´t figure out how though. Does anybody have a sugestion?
Thanks in advance. Jokko