DB73
Board Regular
- Joined
- Jun 7, 2022
- Messages
- 102
- Office Version
- 365
- 2021
- 2019
- 2016
- 2010
- 2007
- Platform
- Windows
- Mobile
- Web
how do i write the following in a shorter way, if possible.
i would like to have the possibility to change the subjects
the following comes after "then",is there also a way to make it shorter and the possibility to change the subject if necesary.
i mean, just name all the comboboxes that are needed and the the values and the color in one line.
now i write it for eacht combobox
i would like to have the possibility to change the subjects
VBA Code:
If ComboBox1.value = "ziek" Or ComboBox1.value = "verlof" Or ComboBox1.value = "feestdag" Or ComboBox1.value = "bijzonder verlof" Then
the following comes after "then",is there also a way to make it shorter and the possibility to change the subject if necesary.
i mean, just name all the comboboxes that are needed and the the values and the color in one line.
now i write it for eacht combobox
VBA Code:
'project
ComboBox2.Enabled = False
ComboBox2.value = "-"
ComboBox2.BackColor = RGB(210, 210, 210)
'werklocatie
ComboBox3.Enabled = False
ComboBox3.value = "-"
ComboBox3.BackColor = RGB(210, 210, 210)
'normale of overuren
ComboBox4.Enabled = False
ComboBox4.value = "-"
ComboBox4.BackColor = RGB(210, 210, 210)