Private Sub ComboBox4_Change()
If ComboBox4.ListIndex = -1 Then Exit Sub
Select Case ComboBox4.ListIndex
Case 0 ' Moulage/assemblage
ctl = Array("1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1")
Case 1 ' Sortare
ctl = Array("0", "0", "1", "0", "0", "1", "0", "0", "0", "1", "0", "0", "1")
Case 2, 3 ' Ambalare, Control 100%
ctl = Array("0", "0", "1", "0", "0", "1", "0", "0", "0", "1", "0", "0", "1")
Case 4 ' Formare *
ctl = Array("0", "0", "1", "0", "0", "1", "0", "0", "0", "1", "0", "0", "1")
Case 5 ' Sedinta *
ctl = Array("0", "0", "1", "0", "0", "1", "0", "0", "0", "1", "0", "0", "1")
End Select
Production1.ComboBox1.Visible = IIf(ctl(0) = "1", True, False)
Production1.ComboBox2.Visible = IIf(ctl(1) = "1", True, False)
Production1.ComboBox3.Visible = IIf(ctl(2) = "1", True, False)
Production1.TextBox1.Visible = IIf(ctl(3) = "1", True, False)
Production1.TextBox2.Visible = IIf(ctl(4) = "1", True, False)
Production1.TextBox3.Visible = IIf(ctl(5) = "1", True, False)
Production1.CheckBox1.Visible = IIf(ctl(6) = "1", True, False)
Production1.Label30.Visible = IIf(ctl(7) = "1", True, False)
Production1.Label5.Visible = IIf(ctl(8) = "1", True, False)
Production1.Label4.Visible = IIf(ctl(9) = "1", True, False)
Production1.Label6.Visible = IIf(ctl(10) = "1", True, False)
Production1.Label7.Visible = IIf(ctl(11) = "1", True, False)
Production1.Label27.Visible = IIf(ctl(12) = "1", True, False)
Production1.ComboBox4.ListIndex = -1
End Sub