If check4 = True Then MsgBox "Не корректный ввод данных", vbCritical, "Ошибка": Exit Sub
потр_пост(1) = TextBox4.Text
потр_пост(2) = TextBox5.Text
потр_пост(3) = TextBox2.Text
потр_пост(4) = TextBox3.Text
потр_пост(5) = TextBox1.Text
потр_пост(6) = TextBox7.Text
потр_пост(7) = TextBox6.Text
k = 0
If ComboBox1.Visible = True Then k = k + 1
If ComboBox2.Visible = True Then k = k + 1
If ComboBox3.Visible = True Then k = k + 1
If ComboBox4.Visible = True Then k = k + 1
If ComboBox5.Visible = True Then k = k + 1
If ComboBox6.Visible = True Then k = k + 1
If ComboBox7.Visible = True Then k = k + 1
ReDim потр(1 To k)
ReDim kol_potr(1 To k)
i = 1
If ComboBox1.Visible = True Then потр(i) = ComboBox1.Text: kol_potr(i) = потр_пост(потр(i)): i = i + 1
If ComboBox2.Visible = True Then потр(i) = ComboBox2.Text: kol_potr(i) = потр_пост(потр(i)): i = i + 1
If ComboBox3.Visible = True Then потр(i) = ComboBox3.Text: kol_potr(i) = потр_пост(потр(i)): i = i + 1
If ComboBox4.Visible = True Then потр(i) = ComboBox4.Text: kol_potr(i) = потр_пост(потр(i)): i = i + 1
If ComboBox5.Visible = True Then потр(i) = ComboBox5.Text: kol_potr(i) = потр_пост(потр(i)): i = i + 1
If ComboBox6.Visible = True Then потр(i) = ComboBox6.Text: kol_potr(i) = потр_пост(потр(i)): i = i + 1
If ComboBox7.Visible = True Then потр(i) = ComboBox7.Text: kol_potr(i) = потр_пост(потр(i)): i = i + 1
h = 0
If ComboBox8.Visible = True Then h = h + 1
If ComboBox9.Visible = True Then h = h + 1
If ComboBox10.Visible = True Then h = h + 1
If ComboBox11.Visible = True Then h = h + 1
If ComboBox12.Visible = True Then h = h + 1
If ComboBox13.Visible = True Then h = h + 1
If ComboBox14.Visible = True Then h = h + 1
ReDim kol_post(1 To h)
ReDim пост(1 To h)
i = 1
If ComboBox8.Visible = True Then пост(i) = ComboBox8.Text: kol_post(i) = (-1) * потр_пост(пост(i)): i = i + 1
If ComboBox9.Visible = True Then пост(i) = ComboBox9.Text: kol_post(i) = (-1) * потр_пост(пост(i)): i = i + 1
If ComboBox10.Visible = True Then пост(i) = ComboBox10.Text: kol_post(i) = (-1) * потр_пост(пост(i)):i = i + 1
If ComboBox11.Visible = True Then пост(i) = ComboBox11.Text: kol_post(i) = (-1) * потр_пост(пост(i)):i = i + 1
If ComboBox12.Visible = True Then пост(i) = ComboBox12.Text: kol_post(i) = (-1) * потр_пост(пост(i)):i = i + 1
If ComboBox13.Visible = True Then пост(i) = ComboBox13.Text: kol_post(i) = (-1) * потр_пост(пост(i)):i = i + 1
If ComboBox14.Visible = True Then пост(i) = ComboBox14.Text: kol_post(i) = (-1) * потр_пост(пост(i)):i = i + 1
check3 = False
For i = 1 To k Step 1
For j = 1 To h Step 1
If потр(i) = пост(j) Then check3 = True
Next j
Next i
If check3 = True Then
For i = 1 To k Step 1
For j = 1 To h Step 1
If ComboBox1.Value = True Then If потр(i) = Val(ComboBox1.Text) And пост(j) = Val(ComboBox1.Text) Then ComboBox1.BackColor = &H404040
If ComboBox2.Value = True Then If потр(i) = Val(ComboBox2.Text) And пост(j) = Val(ComboBox2.Text) Then ComboBox2.BackColor = &H404040
If ComboBox3.Value = True Then If потр(i) = Val(ComboBox3.Text) And пост(j) = Val(ComboBox3.Text) Then ComboBox3.BackColor = &H404040
If ComboBox4.Value = True Then If потр(i) = Val(ComboBox4.Text) And пост(j) = Val(ComboBox4.Text) Then ComboBox4.BackColor = &H404040
If ComboBox5.Value = True Then If потр(i) = Val(ComboBox5.Text) And пост(j) = Val(ComboBox5.Text) Then ComboBox5.BackColor = &H404040
If ComboBox6.Value = True Then If потр(i) = Val(ComboBox6.Text) And пост(j) = Val(ComboBox6.Text) Then ComboBox6.BackColor = &H404040
If ComboBox7.Value = True Then If потр(i) = Val(ComboBox7.Text) And пост(j) = Val(ComboBox7.Text) Then ComboBox7.BackColor = &H404040
If ComboBox8.Value = True Then If потр(i) = Val(ComboBox8.Text) And пост(j) = Val(ComboBox8.Text) Then ComboBox8.BackColor = &H404040
If ComboBox9.Value = True Then If потр(i) = Val(ComboBox9.Text) And пост(j) = Val(ComboBox9.Text) Then ComboBox9.BackColor = &H404040
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.