i hve problem with my vba coding..and i dont know hor to reduce it..plz anyone help me..my interface have too many texboxt
Private Sub ComboBox1_Change()
If ComboBox1 = 1 And ComboBox2 = 1 Then
description.Visible = True
FlowRate.Visible = True
Contaminant1.Visible = True
Contaminant2.Visible = False
Contaminant3.Visible = False
Contaminant4.Visible = False
Contaminant5.Visible = False
Contaminant6.Visible = False
Contaminant7.Visible = False
Contaminant8.Visible = False
Contaminant9.Visible = False
Contaminant10.Visible = False
Label1.Visible = True
cont1.Visible = True
cont2.Visible = False
cont3.Visible = False
cont4.Visible = False
cont5.Visible = False
cont6.Visible = False
cont7.Visible = False
cont8.Visible = False
cont9.Visible = False
cont10.Visible = False
ppm1.Visible = True
ppm2.Visible = False
ppm3.Visible = False
ppm4.Visible = False
ppm5.Visible = False
ppm6.Visible = False
ppm7.Visible = False
ppm8.Visible = False
ppm9.Visible = False
ppm10.Visible = False
D1.Visible = True
D2.Visible = False
D3.Visible = False
D4.Visible = False
D5.Visible = False
D6.Visible = False
D7.Visible = False
D8.Visible = False
D9.Visible = False
D10.Visible = False
D11.Visible = False
D12.Visible = False
D13.Visible = False
D14.Visible = False
D15.Visible = False
D16.Visible = False
D17.Visible = False
D18.Visible = False
D19.Visible = False
D20.Visible = False
TD1.Visible = True
TD2.Visible = False
TD3.Visible = False
TD4.Visible = False
TD5.Visible = False
TD6.Visible = False
TD7.Visible = False
TD8.Visible = False
TD9.Visible = False
TD10.Visible = False
TD11.Visible = False
TD12.Visible = False
TD13.Visible = False
TD14.Visible = False
TD15.Visible = False
TD16.Visible = False
TD17.Visible = False
TD18.Visible = False
TD19.Visible = False
TD20.Visible = False
txtDemFlow1.Visible = True
txtDemFlow2.Visible = False
txtDemFlow3.Visible = False
txtDemFlow4.Visible = False
txtDemFlow5.Visible = False
txtDemFlow6.Visible = False
txtDemFlow7.Visible = False
txtDemFlow8.Visible = False
txtDemFlow9.Visible = False
txtDemFlow10.Visible = False
txtDemFlow11.Visible = False
txtDemFlow12.Visible = False
txtDemFlow13.Visible = False
txtDemFlow14.Visible = False
txtDemFlow15.Visible = False
txtDemFlow16.Visible = False
txtDemFlow17.Visible = False
txtDemFlow18.Visible = False
txtDemFlow19.Visible = False
txtDemFlow20.Visible = False
txtDem1Cont1.Visible = True
txtDem2Cont1.Visible = False
txtDem3Cont1.Visible = False
txtDem4Cont1.Visible = False
txtDem5Cont1.Visible = False
txtDem6Cont1.Visible = False
txtDem7Cont1.Visible = False
txtDem8Cont1.Visible = False
txtDem9Cont1.Visible = False
txtDem10Cont1.Visible = False
txtDem11Cont1.Visible = False
txtDem12Cont1.Visible = False
txtDem13Cont1.Visible = False
txtDem14Cont1.Visible = False
txtDem15Cont1.Visible = False
txtDem16Cont1.Visible = False
txtDem17Cont1.Visible = False
txtDem18Cont1.Visible = False
txtDem19Cont1.Visible = False
txtDem20Cont1.Visible = False
txtDem1Cont2.Visible = False
txtDem2Cont2.Visible = False
txtDem3Cont2.Visible = False
txtDem4Cont2.Visible = False
txtDem5Cont2.Visible = False
txtDem6Cont2.Visible = False
txtDem7Cont2.Visible = False
txtDem8Cont2.Visible = False
txtDem9Cont2.Visible = False
txtDem10Cont2.Visible = False
txtDem11Cont2.Visible = False
txtDem12Cont2.Visible = False
txtDem13Cont2.Visible = False
txtDem14Cont2.Visible = False
txtDem15Cont2.Visible = False
txtDem16Cont2.Visible = False
txtDem17Cont2.Visible = False
txtDem18Cont2.Visible = False
txtDem19Cont2.Visible = False
txtDem20Cont2.Visible = False
txtDem1Cont3.Visible = False
txtDem2Cont3.Visible = False
txtDem3Cont3.Visible = False
txtDem4Cont3.Visible = False
txtDem5Cont3.Visible = False
txtDem6Cont3.Visible = False
txtDem7Cont3.Visible = False
txtDem8Cont3.Visible = False
txtDem9Cont3.Visible = False
txtDem10Cont3.Visible = False
txtDem11Cont3.Visible = False
txtDem12Cont3.Visible = False
txtDem13Cont3.Visible = False
txtDem14Cont3.Visible = False
txtDem15Cont3.Visible = False
txtDem16Cont3.Visible = False
txtDem17Cont3.Visible = False
txtDem18Cont3.Visible = False
txtDem19Cont3.Visible = False
txtDem20Cont3.Visible = False
txtDem1Cont4.Visible = False
txtDem2Cont4.Visible = False
txtDem3Cont4.Visible = False
txtDem4Cont4.Visible = False
txtDem5Cont4.Visible = False
txtDem6Cont4.Visible = False
txtDem7Cont4.Visible = False
txtDem8Cont4.Visible = False
txtDem9Cont4.Visible = False
txtDem10Cont4.Visible = False
txtDem11Cont4.Visible = False
txtDem12Cont4.Visible = False
txtDem13Cont4.Visible = False
txtDem14Cont4.Visible = False
txtDem15Cont4.Visible = False
txtDem16Cont4.Visible = False
txtDem17Cont4.Visible = False
txtDem18Cont4.Visible = False
txtDem19Cont4.Visible = False
txtDem20Cont4.Visible = False
txtDem1Cont5.Visible = False
txtDem2Cont5.Visible = False
txtDem3Cont5.Visible = False
txtDem4Cont5.Visible = False
txtDem5Cont5.Visible = False
txtDem6Cont5.Visible = False
txtDem7Cont5.Visible = False
txtDem8Cont5.Visible = False
txtDem9Cont5.Visible = False
txtDem10Cont5.Visible = False
txtDem11Cont5.Visible = False
txtDem12Cont5.Visible = False
txtDem13Cont5.Visible = False
txtDem14Cont5.Visible = False
txtDem15Cont5.Visible = False
txtDem16Cont5.Visible = False
txtDem17Cont5.Visible = False
txtDem18Cont5.Visible = False
txtDem19Cont5.Visible = False
txtDem20Cont5.Visible = False
txtDem1Cont6.Visible = False
txtDem2Cont6.Visible = False
txtDem3Cont6.Visible = False
txtDem4Cont6.Visible = False
txtDem5Cont6.Visible = False
txtDem6Cont6.Visible = False
txtDem7Cont6.Visible = False
txtDem8Cont6.Visible = False
txtDem9Cont6.Visible = False
txtDem10Cont6.Visible = False
txtDem11Cont6.Visible = False
txtDem12Cont6.Visible = False
txtDem13Cont6.Visible = False
txtDem14Cont6.Visible = False
txtDem15Cont6.Visible = False
txtDem16Cont6.Visible = False
txtDem17Cont6.Visible = False
txtDem18Cont6.Visible = False
txtDem19Cont6.Visible = False
txtDem20Cont6.Visible = False
txtDem1Cont7.Visible = False
txtDem2Cont7.Visible = False
txtDem3Cont7.Visible = False
txtDem4Cont7.Visible = False
txtDem5Cont7.Visible = False
txtDem6Cont7.Visible = False
txtDem7Cont7.Visible = False
txtDem8Cont7.Visible = False
txtDem9Cont7.Visible = False
txtDem10Cont7.Visible = False
txtDem11Cont7.Visible = False
txtDem12Cont7.Visible = False
txtDem13Cont7.Visible = False
txtDem14Cont7.Visible = False
txtDem15Cont7.Visible = False
txtDem16Cont7.Visible = False
txtDem17Cont7.Visible = False
txtDem18Cont7.Visible = False
txtDem19Cont7.Visible = False
txtDem20Cont7.Visible = False
txtDem1Cont8.Visible = False
txtDem2Cont8.Visible = False
txtDem3Cont8.Visible = False
txtDem4Cont8.Visible = False
txtDem5Cont8.Visible = False
txtDem6Cont8.Visible = False
txtDem7Cont8.Visible = False
txtDem8Cont8.Visible = False
txtDem9Cont8.Visible = False
txtDem10Cont8.Visible = False
txtDem11Cont8.Visible = False
txtDem12Cont8.Visible = False
txtDem13Cont8.Visible = False
txtDem14Cont8.Visible = False
txtDem15Cont8.Visible = False
txtDem16Cont8.Visible = False
txtDem17Cont8.Visible = False
txtDem18Cont8.Visible = False
txtDem19Cont8.Visible = False
txtDem20Cont8.Visible = False
txtDem1Cont9.Visible = False
txtDem2Cont9.Visible = False
txtDem3Cont9.Visible = False
txtDem4Cont9.Visible = False
txtDem5Cont9.Visible = False
txtDem6Cont9.Visible = False
txtDem7Cont9.Visible = False
txtDem8Cont9.Visible = False
txtDem9Cont9.Visible = False
txtDem10Cont9.Visible = False
txtDem11Cont9.Visible = False
txtDem12Cont9.Visible = False
txtDem13Cont9.Visible = False
txtDem14Cont9.Visible = False
txtDem15Cont9.Visible = False
txtDem16Cont9.Visible = False
txtDem17Cont9.Visible = False
txtDem18Cont9.Visible = False
txtDem19Cont9.Visible = False
txtDem20Cont9.Visible = False
txtDem1Cont10.Visible = False
txtDem2Cont10.Visible = False
txtDem3Cont10.Visible = False
txtDem4Cont10.Visible = False
txtDem5Cont10.Visible = False
txtDem6Cont10.Visible = False
txtDem7Cont10.Visible = False
txtDem8Cont10.Visible = False
txtDem9Cont10.Visible = False
txtDem10Cont10.Visible = False
txtDem11Cont10.Visible = False
txtDem12Cont10.Visible = False
txtDem13Cont10.Visible = False
txtDem14Cont10.Visible = False
txtDem15Cont10.Visible = False
txtDem16Cont10.Visible = False
txtDem17Cont10.Visible = False
txtDem18Cont10.Visible = False
txtDem19Cont10.Visible = False
txtDem20Cont10.Visible = False
.....this repeat 20 time sinse i hve 20 string in combobox
Private Sub ComboBox1_Change()
If ComboBox1 = 1 And ComboBox2 = 1 Then
description.Visible = True
FlowRate.Visible = True
Contaminant1.Visible = True
Contaminant2.Visible = False
Contaminant3.Visible = False
Contaminant4.Visible = False
Contaminant5.Visible = False
Contaminant6.Visible = False
Contaminant7.Visible = False
Contaminant8.Visible = False
Contaminant9.Visible = False
Contaminant10.Visible = False
Label1.Visible = True
cont1.Visible = True
cont2.Visible = False
cont3.Visible = False
cont4.Visible = False
cont5.Visible = False
cont6.Visible = False
cont7.Visible = False
cont8.Visible = False
cont9.Visible = False
cont10.Visible = False
ppm1.Visible = True
ppm2.Visible = False
ppm3.Visible = False
ppm4.Visible = False
ppm5.Visible = False
ppm6.Visible = False
ppm7.Visible = False
ppm8.Visible = False
ppm9.Visible = False
ppm10.Visible = False
D1.Visible = True
D2.Visible = False
D3.Visible = False
D4.Visible = False
D5.Visible = False
D6.Visible = False
D7.Visible = False
D8.Visible = False
D9.Visible = False
D10.Visible = False
D11.Visible = False
D12.Visible = False
D13.Visible = False
D14.Visible = False
D15.Visible = False
D16.Visible = False
D17.Visible = False
D18.Visible = False
D19.Visible = False
D20.Visible = False
TD1.Visible = True
TD2.Visible = False
TD3.Visible = False
TD4.Visible = False
TD5.Visible = False
TD6.Visible = False
TD7.Visible = False
TD8.Visible = False
TD9.Visible = False
TD10.Visible = False
TD11.Visible = False
TD12.Visible = False
TD13.Visible = False
TD14.Visible = False
TD15.Visible = False
TD16.Visible = False
TD17.Visible = False
TD18.Visible = False
TD19.Visible = False
TD20.Visible = False
txtDemFlow1.Visible = True
txtDemFlow2.Visible = False
txtDemFlow3.Visible = False
txtDemFlow4.Visible = False
txtDemFlow5.Visible = False
txtDemFlow6.Visible = False
txtDemFlow7.Visible = False
txtDemFlow8.Visible = False
txtDemFlow9.Visible = False
txtDemFlow10.Visible = False
txtDemFlow11.Visible = False
txtDemFlow12.Visible = False
txtDemFlow13.Visible = False
txtDemFlow14.Visible = False
txtDemFlow15.Visible = False
txtDemFlow16.Visible = False
txtDemFlow17.Visible = False
txtDemFlow18.Visible = False
txtDemFlow19.Visible = False
txtDemFlow20.Visible = False
txtDem1Cont1.Visible = True
txtDem2Cont1.Visible = False
txtDem3Cont1.Visible = False
txtDem4Cont1.Visible = False
txtDem5Cont1.Visible = False
txtDem6Cont1.Visible = False
txtDem7Cont1.Visible = False
txtDem8Cont1.Visible = False
txtDem9Cont1.Visible = False
txtDem10Cont1.Visible = False
txtDem11Cont1.Visible = False
txtDem12Cont1.Visible = False
txtDem13Cont1.Visible = False
txtDem14Cont1.Visible = False
txtDem15Cont1.Visible = False
txtDem16Cont1.Visible = False
txtDem17Cont1.Visible = False
txtDem18Cont1.Visible = False
txtDem19Cont1.Visible = False
txtDem20Cont1.Visible = False
txtDem1Cont2.Visible = False
txtDem2Cont2.Visible = False
txtDem3Cont2.Visible = False
txtDem4Cont2.Visible = False
txtDem5Cont2.Visible = False
txtDem6Cont2.Visible = False
txtDem7Cont2.Visible = False
txtDem8Cont2.Visible = False
txtDem9Cont2.Visible = False
txtDem10Cont2.Visible = False
txtDem11Cont2.Visible = False
txtDem12Cont2.Visible = False
txtDem13Cont2.Visible = False
txtDem14Cont2.Visible = False
txtDem15Cont2.Visible = False
txtDem16Cont2.Visible = False
txtDem17Cont2.Visible = False
txtDem18Cont2.Visible = False
txtDem19Cont2.Visible = False
txtDem20Cont2.Visible = False
txtDem1Cont3.Visible = False
txtDem2Cont3.Visible = False
txtDem3Cont3.Visible = False
txtDem4Cont3.Visible = False
txtDem5Cont3.Visible = False
txtDem6Cont3.Visible = False
txtDem7Cont3.Visible = False
txtDem8Cont3.Visible = False
txtDem9Cont3.Visible = False
txtDem10Cont3.Visible = False
txtDem11Cont3.Visible = False
txtDem12Cont3.Visible = False
txtDem13Cont3.Visible = False
txtDem14Cont3.Visible = False
txtDem15Cont3.Visible = False
txtDem16Cont3.Visible = False
txtDem17Cont3.Visible = False
txtDem18Cont3.Visible = False
txtDem19Cont3.Visible = False
txtDem20Cont3.Visible = False
txtDem1Cont4.Visible = False
txtDem2Cont4.Visible = False
txtDem3Cont4.Visible = False
txtDem4Cont4.Visible = False
txtDem5Cont4.Visible = False
txtDem6Cont4.Visible = False
txtDem7Cont4.Visible = False
txtDem8Cont4.Visible = False
txtDem9Cont4.Visible = False
txtDem10Cont4.Visible = False
txtDem11Cont4.Visible = False
txtDem12Cont4.Visible = False
txtDem13Cont4.Visible = False
txtDem14Cont4.Visible = False
txtDem15Cont4.Visible = False
txtDem16Cont4.Visible = False
txtDem17Cont4.Visible = False
txtDem18Cont4.Visible = False
txtDem19Cont4.Visible = False
txtDem20Cont4.Visible = False
txtDem1Cont5.Visible = False
txtDem2Cont5.Visible = False
txtDem3Cont5.Visible = False
txtDem4Cont5.Visible = False
txtDem5Cont5.Visible = False
txtDem6Cont5.Visible = False
txtDem7Cont5.Visible = False
txtDem8Cont5.Visible = False
txtDem9Cont5.Visible = False
txtDem10Cont5.Visible = False
txtDem11Cont5.Visible = False
txtDem12Cont5.Visible = False
txtDem13Cont5.Visible = False
txtDem14Cont5.Visible = False
txtDem15Cont5.Visible = False
txtDem16Cont5.Visible = False
txtDem17Cont5.Visible = False
txtDem18Cont5.Visible = False
txtDem19Cont5.Visible = False
txtDem20Cont5.Visible = False
txtDem1Cont6.Visible = False
txtDem2Cont6.Visible = False
txtDem3Cont6.Visible = False
txtDem4Cont6.Visible = False
txtDem5Cont6.Visible = False
txtDem6Cont6.Visible = False
txtDem7Cont6.Visible = False
txtDem8Cont6.Visible = False
txtDem9Cont6.Visible = False
txtDem10Cont6.Visible = False
txtDem11Cont6.Visible = False
txtDem12Cont6.Visible = False
txtDem13Cont6.Visible = False
txtDem14Cont6.Visible = False
txtDem15Cont6.Visible = False
txtDem16Cont6.Visible = False
txtDem17Cont6.Visible = False
txtDem18Cont6.Visible = False
txtDem19Cont6.Visible = False
txtDem20Cont6.Visible = False
txtDem1Cont7.Visible = False
txtDem2Cont7.Visible = False
txtDem3Cont7.Visible = False
txtDem4Cont7.Visible = False
txtDem5Cont7.Visible = False
txtDem6Cont7.Visible = False
txtDem7Cont7.Visible = False
txtDem8Cont7.Visible = False
txtDem9Cont7.Visible = False
txtDem10Cont7.Visible = False
txtDem11Cont7.Visible = False
txtDem12Cont7.Visible = False
txtDem13Cont7.Visible = False
txtDem14Cont7.Visible = False
txtDem15Cont7.Visible = False
txtDem16Cont7.Visible = False
txtDem17Cont7.Visible = False
txtDem18Cont7.Visible = False
txtDem19Cont7.Visible = False
txtDem20Cont7.Visible = False
txtDem1Cont8.Visible = False
txtDem2Cont8.Visible = False
txtDem3Cont8.Visible = False
txtDem4Cont8.Visible = False
txtDem5Cont8.Visible = False
txtDem6Cont8.Visible = False
txtDem7Cont8.Visible = False
txtDem8Cont8.Visible = False
txtDem9Cont8.Visible = False
txtDem10Cont8.Visible = False
txtDem11Cont8.Visible = False
txtDem12Cont8.Visible = False
txtDem13Cont8.Visible = False
txtDem14Cont8.Visible = False
txtDem15Cont8.Visible = False
txtDem16Cont8.Visible = False
txtDem17Cont8.Visible = False
txtDem18Cont8.Visible = False
txtDem19Cont8.Visible = False
txtDem20Cont8.Visible = False
txtDem1Cont9.Visible = False
txtDem2Cont9.Visible = False
txtDem3Cont9.Visible = False
txtDem4Cont9.Visible = False
txtDem5Cont9.Visible = False
txtDem6Cont9.Visible = False
txtDem7Cont9.Visible = False
txtDem8Cont9.Visible = False
txtDem9Cont9.Visible = False
txtDem10Cont9.Visible = False
txtDem11Cont9.Visible = False
txtDem12Cont9.Visible = False
txtDem13Cont9.Visible = False
txtDem14Cont9.Visible = False
txtDem15Cont9.Visible = False
txtDem16Cont9.Visible = False
txtDem17Cont9.Visible = False
txtDem18Cont9.Visible = False
txtDem19Cont9.Visible = False
txtDem20Cont9.Visible = False
txtDem1Cont10.Visible = False
txtDem2Cont10.Visible = False
txtDem3Cont10.Visible = False
txtDem4Cont10.Visible = False
txtDem5Cont10.Visible = False
txtDem6Cont10.Visible = False
txtDem7Cont10.Visible = False
txtDem8Cont10.Visible = False
txtDem9Cont10.Visible = False
txtDem10Cont10.Visible = False
txtDem11Cont10.Visible = False
txtDem12Cont10.Visible = False
txtDem13Cont10.Visible = False
txtDem14Cont10.Visible = False
txtDem15Cont10.Visible = False
txtDem16Cont10.Visible = False
txtDem17Cont10.Visible = False
txtDem18Cont10.Visible = False
txtDem19Cont10.Visible = False
txtDem20Cont10.Visible = False
.....this repeat 20 time sinse i hve 20 string in combobox