Sub
CheckboxPropertiesDefault()
For
iCheckboxPropertiesDefault = 0
To
CheckBoxGrenzeSpalte
If
Range(SSPALTE_C & iCheckboxPropertiesDefault + StartZelle) =
"-"
Then
nofunc =
False
Range(SSPALTE_C & iCheckboxPropertiesDefault + StartZelle).Interior.ColorIndex = 0
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_C).
Object
.value = Null
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_C).
Object
.Enabled =
False
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_C).Visible =
False
Else
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_C).
Object
.Enabled =
True
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_C).Visible =
True
End
If
If
Range(SSPALTE_E & iCheckboxPropertiesDefault + StartZelle) =
"-"
Then
nofunc =
False
Range(SSPALTE_E & iCheckboxPropertiesDefault + StartZelle).Interior.ColorIndex = 0
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault).
Object
.value = Null
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault).
Object
.Enabled =
False
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault).Visible =
False
Else
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault).
Object
.Enabled =
True
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault).Visible =
True
End
If
If
Range(SSPALTE_G & iCheckboxPropertiesDefault + StartZelle) =
"-"
Then
nofunc =
False
Range(SSPALTE_G & iCheckboxPropertiesDefault + StartZelle).Interior.ColorIndex = 0
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_G).
Object
.value = Null
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_G).
Object
.Enabled =
False
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_G).Visible =
False
Else
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_G).
Object
.Enabled =
True
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_G).Visible =
True
End
If
If
Range(SSPALTE_I & iCheckboxPropertiesDefault + StartZelle) =
"-"
Then
nofunc =
False
Range(SSPALTE_I & iCheckboxPropertiesDefault + StartZelle).Interior.ColorIndex = 0
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_I).
Object
.value = Null
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_I).
Object
.Enabled =
False
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_I).Visible =
False
Else
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_I).
Object
.Enabled =
True
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_I).Visible =
True
End
If
If
Range(SSPALTE_C & iCheckboxPropertiesDefault + StartZelle).Interior.Color = LIGHTBLUE
Then
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault + CheckBoxStartSPALTE_C).
Object
.Enabled =
False
End
If
If
Range(SSPALTE_E & iCheckboxPropertiesDefault + StartZelle).Interior.Color = LIGHTBLUE
Then
ActiveSheet.OLEObjects(
"Checkbox"
& iCheckboxPropertiesDefault).
Object
.Enabled =
False
End
If
Next
iCheckboxPropertiesDefault
End
Sub
Also es geht nicht darum, dass du/ihr den Code bearbeitet und aufs Detail untersucht. Dieser soll einfach nur einmal darstellen,
in welche Form ich an dem Projekt arbeite.
Ich möchte einfach mal eure Meinung über die idee hören und vielleicht Möglichkeiten so eine Aufgabe eleganter zu lösen..
Der Code soll in Vba bzw Excel bleiben.
Anbei noch ein Bild, wie das
Interface
aussieht.
Besten Dank!