Procédure trop longue je ne sait pas faire les boucles

[Fermé]
Signaler
-
Messages postés
1769
Date d'inscription
lundi 7 avril 2008
Statut
Membre
Dernière intervention
15 juin 2020
-
Bonjour,

Je souhaite raccourcir mon code, mais je suis un débutant et je ne maitrise pas du tout les boucles... est ce que quelqu'un d'assez aimable pourrait m'aider ?

voici la totalité du code a raccourcir:

Private Sub TextBox374_Change()
Sheets("vacances").Range("C39").Value = TextBox374.Value
TextBox373.Value = Sheets("vacances").Range("C38").Text
TextBox375.Value = Sheets("vacances").Range("C40").Text

End Sub



Private Sub UserForm_Initialize()

TextBox1.Value = Sheets("vacances").Range("C3").Text
TextBox2.Value = Sheets("vacances").Range("C4").Text
TextBox3.Value = Sheets("vacances").Range("C5").Text
TextBox4.Value = Sheets("vacances").Range("C6").Text
TextBox5.Value = Sheets("vacances").Range("C7").Text
TextBox6.Value = Sheets("vacances").Range("C8").Text
TextBox7.Value = Sheets("vacances").Range("C9").Text
TextBox8.Value = Sheets("vacances").Range("C10").Text
TextBox9.Value = Sheets("vacances").Range("C11").Text
TextBox10.Value = Sheets("vacances").Range("C12").Text
TextBox11.Value = Sheets("vacances").Range("C13").Text
TextBox12.Value = Sheets("vacances").Range("C14").Text
TextBox13.Value = Sheets("vacances").Range("C15").Text
TextBox14.Value = Sheets("vacances").Range("C16").Text
TextBox15.Value = Sheets("vacances").Range("C17").Text
TextBox16.Value = Sheets("vacances").Range("C18").Text
TextBox17.Value = Sheets("vacances").Range("C19").Text
TextBox18.Value = Sheets("vacances").Range("C20").Text
TextBox19.Value = Sheets("vacances").Range("C21").Text
TextBox20.Value = Sheets("vacances").Range("C22").Text
TextBox21.Value = Sheets("vacances").Range("C23").Text
TextBox22.Value = Sheets("vacances").Range("C24").Text
TextBox23.Value = Sheets("vacances").Range("C25").Text
TextBox24.Value = Sheets("vacances").Range("C26").Text
TextBox25.Value = Sheets("vacances").Range("C27").Text
TextBox26.Value = Sheets("vacances").Range("C28").Text
TextBox27.Value = Sheets("vacances").Range("C29").Text
TextBox28.Value = Sheets("vacances").Range("C30").Text
TextBox29.Value = Sheets("vacances").Range("C31").Text
TextBox30.Value = Sheets("vacances").Range("C32").Text
TextBox31.Value = Sheets("vacances").Range("C33").Text
TextBox32.Value = Sheets("vacances").Range("D3").Text
TextBox33.Value = Sheets("vacances").Range("D4").Text
TextBox34.Value = Sheets("vacances").Range("D5").Text
TextBox35.Value = Sheets("vacances").Range("D6").Text
TextBox36.Value = Sheets("vacances").Range("D7").Text
TextBox37.Value = Sheets("vacances").Range("D8").Text
TextBox38.Value = Sheets("vacances").Range("D9").Text
TextBox39.Value = Sheets("vacances").Range("D10").Text
TextBox40.Value = Sheets("vacances").Range("D11").Text
TextBox41.Value = Sheets("vacances").Range("D12").Text
TextBox42.Value = Sheets("vacances").Range("D13").Text
TextBox43.Value = Sheets("vacances").Range("D14").Text
TextBox44.Value = Sheets("vacances").Range("D15").Text
TextBox45.Value = Sheets("vacances").Range("D16").Text
TextBox46.Value = Sheets("vacances").Range("D17").Text
TextBox47.Value = Sheets("vacances").Range("D18").Text
TextBox48.Value = Sheets("vacances").Range("D19").Text
TextBox49.Value = Sheets("vacances").Range("D20").Text
TextBox50.Value = Sheets("vacances").Range("D21").Text
TextBox51.Value = Sheets("vacances").Range("D22").Text
TextBox52.Value = Sheets("vacances").Range("D23").Text
TextBox53.Value = Sheets("vacances").Range("D24").Text
TextBox54.Value = Sheets("vacances").Range("D25").Text
TextBox55.Value = Sheets("vacances").Range("D26").Text
TextBox56.Value = Sheets("vacances").Range("D27").Text
TextBox57.Value = Sheets("vacances").Range("D28").Text
TextBox58.Value = Sheets("vacances").Range("D29").Text
TextBox59.Value = Sheets("vacances").Range("D30").Text
TextBox60.Value = Sheets("vacances").Range("D31").Text
TextBox61.Value = Sheets("vacances").Range("D32").Text
TextBox62.Value = Sheets("vacances").Range("D33").Text
TextBox63.Value = Sheets("vacances").Range("E3").Text
TextBox64.Value = Sheets("vacances").Range("E4").Text
TextBox65.Value = Sheets("vacances").Range("E5").Text
TextBox66.Value = Sheets("vacances").Range("E6").Text
TextBox67.Value = Sheets("vacances").Range("E7").Text
TextBox68.Value = Sheets("vacances").Range("E8").Text
TextBox69.Value = Sheets("vacances").Range("E9").Text
TextBox70.Value = Sheets("vacances").Range("E10").Text
TextBox71.Value = Sheets("vacances").Range("E11").Text
TextBox72.Value = Sheets("vacances").Range("E12").Text
TextBox73.Value = Sheets("vacances").Range("E13").Text
TextBox74.Value = Sheets("vacances").Range("E14").Text
TextBox75.Value = Sheets("vacances").Range("E15").Text
TextBox76.Value = Sheets("vacances").Range("E16").Text
TextBox77.Value = Sheets("vacances").Range("E17").Text
TextBox78.Value = Sheets("vacances").Range("E18").Text
TextBox79.Value = Sheets("vacances").Range("E19").Text
TextBox80.Value = Sheets("vacances").Range("E20").Text
TextBox81.Value = Sheets("vacances").Range("E21").Text
TextBox82.Value = Sheets("vacances").Range("E22").Text
TextBox83.Value = Sheets("vacances").Range("E23").Text
TextBox84.Value = Sheets("vacances").Range("E24").Text
TextBox85.Value = Sheets("vacances").Range("E25").Text
TextBox86.Value = Sheets("vacances").Range("E26").Text
TextBox87.Value = Sheets("vacances").Range("E27").Text
TextBox88.Value = Sheets("vacances").Range("E28").Text
TextBox89.Value = Sheets("vacances").Range("E29").Text
TextBox90.Value = Sheets("vacances").Range("E30").Text
TextBox91.Value = Sheets("vacances").Range("E31").Text
TextBox92.Value = Sheets("vacances").Range("E32").Text
TextBox93.Value = Sheets("vacances").Range("E33").Text
TextBox94.Value = Sheets("vacances").Range("F3").Text
TextBox95.Value = Sheets("vacances").Range("F4").Text
TextBox96.Value = Sheets("vacances").Range("F5").Text
TextBox97.Value = Sheets("vacances").Range("F6").Text
TextBox98.Value = Sheets("vacances").Range("F7").Text
TextBox99.Value = Sheets("vacances").Range("F8").Text
TextBox100.Value = Sheets("vacances").Range("F9").Text
TextBox101.Value = Sheets("vacances").Range("F10").Text
TextBox102.Value = Sheets("vacances").Range("F11").Text
TextBox103.Value = Sheets("vacances").Range("F12").Text
TextBox104.Value = Sheets("vacances").Range("F13").Text
TextBox105.Value = Sheets("vacances").Range("F14").Text
TextBox106.Value = Sheets("vacances").Range("F15").Text
TextBox107.Value = Sheets("vacances").Range("F16").Text
TextBox108.Value = Sheets("vacances").Range("F17").Text
TextBox109.Value = Sheets("vacances").Range("F18").Text
TextBox110.Value = Sheets("vacances").Range("F19").Text
TextBox111.Value = Sheets("vacances").Range("F20").Text
TextBox112.Value = Sheets("vacances").Range("F21").Text
TextBox113.Value = Sheets("vacances").Range("F22").Text
TextBox114.Value = Sheets("vacances").Range("F23").Text
TextBox115.Value = Sheets("vacances").Range("F24").Text
TextBox116.Value = Sheets("vacances").Range("F25").Text
TextBox117.Value = Sheets("vacances").Range("F26").Text
TextBox118.Value = Sheets("vacances").Range("F27").Text
TextBox119.Value = Sheets("vacances").Range("F28").Text
TextBox120.Value = Sheets("vacances").Range("F29").Text
TextBox121.Value = Sheets("vacances").Range("F30").Text
TextBox122.Value = Sheets("vacances").Range("F31").Text
TextBox123.Value = Sheets("vacances").Range("F32").Text
TextBox124.Value = Sheets("vacances").Range("F33").Text
TextBox125.Value = Sheets("vacances").Range("G3").Text
TextBox126.Value = Sheets("vacances").Range("G4").Text
TextBox127.Value = Sheets("vacances").Range("G5").Text
TextBox128.Value = Sheets("vacances").Range("G6").Text
TextBox129.Value = Sheets("vacances").Range("G7").Text
TextBox130.Value = Sheets("vacances").Range("G8").Text
TextBox131.Value = Sheets("vacances").Range("G9").Text
TextBox132.Value = Sheets("vacances").Range("G10").Text
TextBox133.Value = Sheets("vacances").Range("G11").Text
TextBox134.Value = Sheets("vacances").Range("G12").Text
TextBox135.Value = Sheets("vacances").Range("G13").Text
TextBox136.Value = Sheets("vacances").Range("G14").Text
TextBox137.Value = Sheets("vacances").Range("G15").Text
TextBox138.Value = Sheets("vacances").Range("G16").Text
TextBox139.Value = Sheets("vacances").Range("G17").Text
TextBox140.Value = Sheets("vacances").Range("G18").Text
TextBox141.Value = Sheets("vacances").Range("G19").Text
TextBox142.Value = Sheets("vacances").Range("G20").Text
TextBox143.Value = Sheets("vacances").Range("G21").Text
TextBox144.Value = Sheets("vacances").Range("G22").Text
TextBox145.Value = Sheets("vacances").Range("G23").Text
TextBox146.Value = Sheets("vacances").Range("G24").Text
TextBox147.Value = Sheets("vacances").Range("G25").Text
TextBox148.Value = Sheets("vacances").Range("G26").Text
TextBox149.Value = Sheets("vacances").Range("G27").Text
TextBox150.Value = Sheets("vacances").Range("G28").Text
TextBox151.Value = Sheets("vacances").Range("G29").Text
TextBox152.Value = Sheets("vacances").Range("G30").Text
TextBox153.Value = Sheets("vacances").Range("G31").Text
TextBox154.Value = Sheets("vacances").Range("G32").Text
TextBox155.Value = Sheets("vacances").Range("G33").Text
TextBox156.Value = Sheets("vacances").Range("H3").Text
TextBox157.Value = Sheets("vacances").Range("H4").Text
TextBox158.Value = Sheets("vacances").Range("H5").Text
TextBox159.Value = Sheets("vacances").Range("H6").Text
TextBox160.Value = Sheets("vacances").Range("H7").Text
TextBox161.Value = Sheets("vacances").Range("H8").Text
TextBox162.Value = Sheets("vacances").Range("H9").Text
TextBox163.Value = Sheets("vacances").Range("H10").Text
TextBox164.Value = Sheets("vacances").Range("H11").Text
TextBox165.Value = Sheets("vacances").Range("H12").Text
TextBox166.Value = Sheets("vacances").Range("H13").Text
TextBox167.Value = Sheets("vacances").Range("H14").Text
TextBox168.Value = Sheets("vacances").Range("H15").Text
TextBox169.Value = Sheets("vacances").Range("H16").Text
TextBox170.Value = Sheets("vacances").Range("H17").Text
TextBox171.Value = Sheets("vacances").Range("H18").Text
TextBox172.Value = Sheets("vacances").Range("H19").Text
TextBox173.Value = Sheets("vacances").Range("H20").Text
TextBox174.Value = Sheets("vacances").Range("H21").Text
TextBox175.Value = Sheets("vacances").Range("H22").Text
TextBox176.Value = Sheets("vacances").Range("H23").Text
TextBox177.Value = Sheets("vacances").Range("H24").Text
TextBox178.Value = Sheets("vacances").Range("H25").Text
TextBox179.Value = Sheets("vacances").Range("H26").Text
TextBox180.Value = Sheets("vacances").Range("H27").Text
TextBox181.Value = Sheets("vacances").Range("H28").Text
TextBox182.Value = Sheets("vacances").Range("H29").Text
TextBox183.Value = Sheets("vacances").Range("H30").Text
TextBox184.Value = Sheets("vacances").Range("H31").Text
TextBox185.Value = Sheets("vacances").Range("H32").Text
TextBox186.Value = Sheets("vacances").Range("H33").Text
TextBox187.Value = Sheets("vacances").Range("I3").Text
TextBox188.Value = Sheets("vacances").Range("I4").Text
TextBox189.Value = Sheets("vacances").Range("I5").Text
TextBox190.Value = Sheets("vacances").Range("I6").Text
TextBox191.Value = Sheets("vacances").Range("I7").Text
TextBox192.Value = Sheets("vacances").Range("I8").Text
TextBox193.Value = Sheets("vacances").Range("I9").Text
TextBox194.Value = Sheets("vacances").Range("I10").Text
TextBox195.Value = Sheets("vacances").Range("I11").Text
TextBox196.Value = Sheets("vacances").Range("I12").Text
TextBox197.Value = Sheets("vacances").Range("I13").Text
TextBox198.Value = Sheets("vacances").Range("I14").Text
TextBox199.Value = Sheets("vacances").Range("I15").Text
TextBox200.Value = Sheets("vacances").Range("I16").Text
TextBox201.Value = Sheets("vacances").Range("I17").Text
TextBox202.Value = Sheets("vacances").Range("I18").Text
TextBox203.Value = Sheets("vacances").Range("I19").Text
TextBox204.Value = Sheets("vacances").Range("I20").Text
TextBox205.Value = Sheets("vacances").Range("I21").Text
TextBox206.Value = Sheets("vacances").Range("I22").Text
TextBox207.Value = Sheets("vacances").Range("I23").Text
TextBox208.Value = Sheets("vacances").Range("I24").Text
TextBox209.Value = Sheets("vacances").Range("I25").Text
TextBox210.Value = Sheets("vacances").Range("I26").Text
TextBox211.Value = Sheets("vacances").Range("I27").Text
TextBox212.Value = Sheets("vacances").Range("I28").Text
TextBox213.Value = Sheets("vacances").Range("I29").Text
TextBox214.Value = Sheets("vacances").Range("I30").Text
TextBox215.Value = Sheets("vacances").Range("I31").Text
TextBox216.Value = Sheets("vacances").Range("I32").Text
TextBox217.Value = Sheets("vacances").Range("I33").Text
TextBox218.Value = Sheets("vacances").Range("J3").Text
TextBox219.Value = Sheets("vacances").Range("J4").Text
TextBox220.Value = Sheets("vacances").Range("J5").Text
TextBox221.Value = Sheets("vacances").Range("J6").Text
TextBox222.Value = Sheets("vacances").Range("J7").Text
TextBox223.Value = Sheets("vacances").Range("J8").Text
TextBox224.Value = Sheets("vacances").Range("J9").Text
TextBox225.Value = Sheets("vacances").Range("J10").Text
TextBox226.Value = Sheets("vacances").Range("J11").Text
TextBox227.Value = Sheets("vacances").Range("J12").Text
TextBox228.Value = Sheets("vacances").Range("J13").Text
TextBox229.Value = Sheets("vacances").Range("J14").Text
TextBox230.Value = Sheets("vacances").Range("J15").Text
TextBox231.Value = Sheets("vacances").Range("J16").Text
TextBox232.Value = Sheets("vacances").Range("J17").Text
TextBox233.Value = Sheets("vacances").Range("J18").Text
TextBox234.Value = Sheets("vacances").Range("J19").Text
TextBox235.Value = Sheets("vacances").Range("J20").Text
TextBox236.Value = Sheets("vacances").Range("J21").Text
TextBox237.Value = Sheets("vacances").Range("J22").Text
TextBox238.Value = Sheets("vacances").Range("J23").Text
TextBox239.Value = Sheets("vacances").Range("J24").Text
TextBox240.Value = Sheets("vacances").Range("J25").Text
TextBox241.Value = Sheets("vacances").Range("J26").Text
TextBox242.Value = Sheets("vacances").Range("J27").Text
TextBox243.Value = Sheets("vacances").Range("J28").Text
TextBox244.Value = Sheets("vacances").Range("J29").Text
TextBox245.Value = Sheets("vacances").Range("J30").Text
TextBox246.Value = Sheets("vacances").Range("J31").Text
TextBox247.Value = Sheets("vacances").Range("J32").Text
TextBox248.Value = Sheets("vacances").Range("J33").Text
TextBox249.Value = Sheets("vacances").Range("K3").Text
TextBox250.Value = Sheets("vacances").Range("K4").Text
TextBox251.Value = Sheets("vacances").Range("K5").Text
TextBox252.Value = Sheets("vacances").Range("K6").Text
TextBox253.Value = Sheets("vacances").Range("K7").Text
TextBox254.Value = Sheets("vacances").Range("K8").Text
TextBox255.Value = Sheets("vacances").Range("K9").Text
TextBox256.Value = Sheets("vacances").Range("K10").Text
TextBox257.Value = Sheets("vacances").Range("K11").Text
TextBox258.Value = Sheets("vacances").Range("K12").Text
TextBox259.Value = Sheets("vacances").Range("K13").Text
TextBox260.Value = Sheets("vacances").Range("K14").Text
TextBox261.Value = Sheets("vacances").Range("K15").Text
TextBox262.Value = Sheets("vacances").Range("K16").Text
TextBox263.Value = Sheets("vacances").Range("K17").Text
TextBox264.Value = Sheets("vacances").Range("K18").Text
TextBox265.Value = Sheets("vacances").Range("K19").Text
TextBox266.Value = Sheets("vacances").Range("K20").Text
TextBox267.Value = Sheets("vacances").Range("K21").Text
TextBox268.Value = Sheets("vacances").Range("K22").Text
TextBox269.Value = Sheets("vacances").Range("K23").Text
TextBox270.Value = Sheets("vacances").Range("K24").Text
TextBox271.Value = Sheets("vacances").Range("K25").Text
TextBox272.Value = Sheets("vacances").Range("K26").Text
TextBox273.Value = Sheets("vacances").Range("K27").Text
TextBox274.Value = Sheets("vacances").Range("K28").Text
TextBox275.Value = Sheets("vacances").Range("K29").Text
TextBox276.Value = Sheets("vacances").Range("K30").Text
TextBox277.Value = Sheets("vacances").Range("K31").Text
TextBox278.Value = Sheets("vacances").Range("K32").Text
TextBox279.Value = Sheets("vacances").Range("K33").Text
TextBox280.Value = Sheets("vacances").Range("L3").Text
TextBox281.Value = Sheets("vacances").Range("L4").Text
TextBox282.Value = Sheets("vacances").Range("L5").Text
TextBox283.Value = Sheets("vacances").Range("L6").Text
TextBox284.Value = Sheets("vacances").Range("L7").Text
TextBox285.Value = Sheets("vacances").Range("L8").Text
TextBox286.Value = Sheets("vacances").Range("L9").Text
TextBox287.Value = Sheets("vacances").Range("L10").Text
TextBox288.Value = Sheets("vacances").Range("L11").Text
TextBox289.Value = Sheets("vacances").Range("L12").Text
TextBox290.Value = Sheets("vacances").Range("L13").Text
TextBox291.Value = Sheets("vacances").Range("L14").Text
TextBox292.Value = Sheets("vacances").Range("L15").Text
TextBox293.Value = Sheets("vacances").Range("L16").Text
TextBox294.Value = Sheets("vacances").Range("L17").Text
TextBox295.Value = Sheets("vacances").Range("L18").Text
TextBox296.Value = Sheets("vacances").Range("L19").Text
TextBox297.Value = Sheets("vacances").Range("L20").Text
TextBox298.Value = Sheets("vacances").Range("L21").Text
TextBox299.Value = Sheets("vacances").Range("L22").Text
TextBox300.Value = Sheets("vacances").Range("L23").Text
TextBox301.Value = Sheets("vacances").Range("L24").Text
TextBox302.Value = Sheets("vacances").Range("L25").Text
TextBox303.Value = Sheets("vacances").Range("L26").Text
TextBox304.Value = Sheets("vacances").Range("L27").Text
TextBox305.Value = Sheets("vacances").Range("L28").Text
TextBox306.Value = Sheets("vacances").Range("L29").Text
TextBox307.Value = Sheets("vacances").Range("L30").Text
TextBox308.Value = Sheets("vacances").Range("L31").Text
TextBox309.Value = Sheets("vacances").Range("L32").Text
TextBox310.Value = Sheets("vacances").Range("L33").Text
TextBox311.Value = Sheets("vacances").Range("M3").Text
TextBox312.Value = Sheets("vacances").Range("M4").Text
TextBox313.Value = Sheets("vacances").Range("M5").Text
TextBox314.Value = Sheets("vacances").Range("M6").Text
TextBox315.Value = Sheets("vacances").Range("M7").Text
TextBox316.Value = Sheets("vacances").Range("M8").Text
TextBox317.Value = Sheets("vacances").Range("M9").Text
TextBox318.Value = Sheets("vacances").Range("M10").Text
TextBox319.Value = Sheets("vacances").Range("M11").Text
TextBox320.Value = Sheets("vacances").Range("M12").Text
TextBox321.Value = Sheets("vacances").Range("M13").Text
TextBox322.Value = Sheets("vacances").Range("M14").Text
TextBox323.Value = Sheets("vacances").Range("M15").Text
TextBox324.Value = Sheets("vacances").Range("M16").Text
TextBox325.Value = Sheets("vacances").Range("M17").Text
TextBox326.Value = Sheets("vacances").Range("M18").Text
TextBox327.Value = Sheets("vacances").Range("M19").Text
TextBox328.Value = Sheets("vacances").Range("M20").Text
TextBox329.Value = Sheets("vacances").Range("M21").Text
TextBox330.Value = Sheets("vacances").Range("M22").Text
TextBox331.Value = Sheets("vacances").Range("M23").Text
TextBox332.Value = Sheets("vacances").Range("M24").Text
TextBox333.Value = Sheets("vacances").Range("M25").Text
TextBox334.Value = Sheets("vacances").Range("M26").Text
TextBox335.Value = Sheets("vacances").Range("M27").Text
TextBox336.Value = Sheets("vacances").Range("M28").Text
TextBox337.Value = Sheets("vacances").Range("M29").Text
TextBox338.Value = Sheets("vacances").Range("M30").Text
TextBox339.Value = Sheets("vacances").Range("M31").Text
TextBox340.Value = Sheets("vacances").Range("M32").Text
TextBox341.Value = Sheets("vacances").Range("M33").Text
TextBox342.Value = Sheets("vacances").Range("N3").Text
TextBox343.Value = Sheets("vacances").Range("N4").Text
TextBox344.Value = Sheets("vacances").Range("N5").Text
TextBox345.Value = Sheets("vacances").Range("N6").Text
TextBox346.Value = Sheets("vacances").Range("N7").Text
TextBox347.Value = Sheets("vacances").Range("N8").Text
TextBox348.Value = Sheets("vacances").Range("N9").Text
TextBox349.Value = Sheets("vacances").Range("N10").Text
TextBox350.Value = Sheets("vacances").Range("N11").Text
TextBox351.Value = Sheets("vacances").Range("N12").Text
TextBox352.Value = Sheets("vacances").Range("N13").Text
TextBox353.Value = Sheets("vacances").Range("N14").Text
TextBox354.Value = Sheets("vacances").Range("N15").Text
TextBox355.Value = Sheets("vacances").Range("N16").Text
TextBox356.Value = Sheets("vacances").Range("N17").Text
TextBox357.Value = Sheets("vacances").Range("N18").Text
TextBox358.Value = Sheets("vacances").Range("N19").Text
TextBox359.Value = Sheets("vacances").Range("N20").Text
TextBox360.Value = Sheets("vacances").Range("N21").Text
TextBox361.Value = Sheets("vacances").Range("N22").Text
TextBox362.Value = Sheets("vacances").Range("N23").Text
TextBox363.Value = Sheets("vacances").Range("N24").Text
TextBox364.Value = Sheets("vacances").Range("N25").Text
TextBox365.Value = Sheets("vacances").Range("N26").Text
TextBox366.Value = Sheets("vacances").Range("N27").Text
TextBox367.Value = Sheets("vacances").Range("N28").Text
TextBox368.Value = Sheets("vacances").Range("N29").Text
TextBox369.Value = Sheets("vacances").Range("N30").Text
TextBox370.Value = Sheets("vacances").Range("N31").Text
TextBox371.Value = Sheets("vacances").Range("N32").Text
TextBox372.Value = Sheets("vacances").Range("N33").Text
TextBox373.Value = Sheets("vacances").Range("C38").Text
TextBox374.Value = Sheets("vacances").Range("C39").Text
TextBox375.Value = Sheets("vacances").Range("C40").Text
TextBox376.Value = Sheets("vacances").Range("C43").Text


If TextBox1.Value = "v" Then
TextBox1.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If
End If

If TextBox2.Value = "v" Then
TextBox2.BackColor = RGB(0, 255, 0)
Else
If TextBox2.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If
End If

If TextBox3.Value = "v" Then
TextBox3.BackColor = RGB(0, 255, 0)
Else
If TextBox3.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox4.Value = "v" Then
TextBox4.BackColor = RGB(0, 255, 0)
Else
If TextBox4.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox5.Value = "v" Then
TextBox5.BackColor = RGB(0, 255, 0)
Else
If TextBox5.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox6.Value = "v" Then
TextBox6.BackColor = RGB(0, 255, 0)
Else
If TextBox6.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox7.Value = "v" Then
TextBox7.BackColor = RGB(0, 255, 0)
Else
If TextBox7.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox8.Value = "v" Then
TextBox8.BackColor = RGB(0, 255, 0)
Else
If TextBox8.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox9.Value = "v" Then
TextBox9.BackColor = RGB(0, 255, 0)
Else
If TextBox9.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox10.Value = "v" Then
TextBox10.BackColor = RGB(0, 255, 0)
Else
If TextBox10.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox11.Value = "v" Then
TextBox11.BackColor = RGB(0, 255, 0)
Else
If TextBox11.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox12.Value = "v" Then
TextBox12.BackColor = RGB(0, 255, 0)
Else
If TextBox12.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox13.Value = "v" Then
TextBox13.BackColor = RGB(0, 255, 0)
Else
If TextBox13.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox14.Value = "v" Then
TextBox14.BackColor = RGB(0, 255, 0)
Else
If TextBox14.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox15.Value = "v" Then
TextBox15.BackColor = RGB(0, 255, 0)
Else
If TextBox15.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox16.Value = "v" Then
TextBox16.BackColor = RGB(0, 255, 0)
Else
If TextBox16.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox17.Value = "v" Then
TextBox17.BackColor = RGB(0, 255, 0)
Else
If TextBox17.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox18.Value = "v" Then
TextBox18.BackColor = RGB(0, 255, 0)
Else
If TextBox18.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox19.Value = "v" Then
TextBox19.BackColor = RGB(0, 255, 0)
Else
If TextBox19.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox20.Value = "v" Then
TextBox20.BackColor = RGB(0, 255, 0)
Else
If TextBox20.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox21.Value = "v" Then
TextBox21.BackColor = RGB(0, 255, 0)
Else
If TextBox21.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox22.Value = "v" Then
TextBox22.BackColor = RGB(0, 255, 0)
Else
If TextBox22.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox23.Value = "v" Then
TextBox23.BackColor = RGB(0, 255, 0)
Else
If TextBox23.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox24.Value = "v" Then
TextBox24.BackColor = RGB(0, 255, 0)
Else
If TextBox24.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox25.Value = "v" Then
TextBox25.BackColor = RGB(0, 255, 0)
Else
If TextBox25.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox26.Value = "v" Then
TextBox26.BackColor = RGB(0, 255, 0)
Else
If TextBox26.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox27.Value = "v" Then
TextBox27.BackColor = RGB(0, 255, 0)
Else
If TextBox27.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox28.Value = "v" Then
TextBox28.BackColor = RGB(0, 255, 0)
Else
If TextBox28.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox29.Value = "v" Then
TextBox29.BackColor = RGB(0, 255, 0)
Else
If TextBox29.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox30.Value = "v" Then
TextBox30.BackColor = RGB(0, 255, 0)
Else
If TextBox30.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox31.Value = "v" Then
TextBox31.BackColor = RGB(0, 255, 0)
Else
If TextBox31.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox32.Value = "v" Then
TextBox32.BackColor = RGB(0, 255, 0)
Else
If TextBox32.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox33.Value = "v" Then
TextBox33.BackColor = RGB(0, 255, 0)
Else
If TextBox33.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox34.Value = "v" Then
TextBox34.BackColor = RGB(0, 255, 0)
Else
If TextBox34.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox35.Value = "v" Then
TextBox35.BackColor = RGB(0, 255, 0)
Else
If TextBox35.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox36.Value = "v" Then
TextBox36.BackColor = RGB(0, 255, 0)
Else
If TextBox36.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox37.Value = "v" Then
TextBox37.BackColor = RGB(0, 255, 0)
Else
If TextBox37.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox38.Value = "v" Then
TextBox38.BackColor = RGB(0, 255, 0)
Else
If TextBox38.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox39.Value = "v" Then
TextBox39.BackColor = RGB(0, 255, 0)
Else
If TextBox39.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox40.Value = "v" Then
TextBox40.BackColor = RGB(0, 255, 0)
Else
If TextBox40.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox41.Value = "v" Then
TextBox41.BackColor = RGB(0, 255, 0)
Else
If TextBox41.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox42.Value = "v" Then
TextBox42.BackColor = RGB(0, 255, 0)
Else
If TextBox42.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox43.Value = "v" Then
TextBox43.BackColor = RGB(0, 255, 0)
Else
If TextBox43.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox44.Value = "v" Then
TextBox44.BackColor = RGB(0, 255, 0)
Else
If TextBox44.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox45.Value = "v" Then
TextBox45.BackColor = RGB(0, 255, 0)
Else
If TextBox45.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox46.Value = "v" Then
TextBox46.BackColor = RGB(0, 255, 0)
Else
If TextBox46.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox47.Value = "v" Then
TextBox47.BackColor = RGB(0, 255, 0)
Else
If TextBox47.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox48.Value = "v" Then
TextBox48.BackColor = RGB(0, 255, 0)
Else
If TextBox48.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox49.Value = "v" Then
TextBox49.BackColor = RGB(0, 255, 0)
Else
If TextBox49.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox50.Value = "v" Then
TextBox50.BackColor = RGB(0, 255, 0)
Else
If TextBox50.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox51.Value = "v" Then
TextBox51.BackColor = RGB(0, 255, 0)
Else
If TextBox51.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox52.Value = "v" Then
TextBox52.BackColor = RGB(0, 255, 0)
Else
If TextBox52.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox53.Value = "v" Then
TextBox53.BackColor = RGB(0, 255, 0)
Else
If TextBox53.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox54.Value = "v" Then
TextBox54.BackColor = RGB(0, 255, 0)
Else
If TextBox54.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox55.Value = "v" Then
TextBox55.BackColor = RGB(0, 255, 0)
Else
If TextBox55.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox56.Value = "v" Then
TextBox56.BackColor = RGB(0, 255, 0)
Else
If TextBox56.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox57.Value = "v" Then
TextBox57.BackColor = RGB(0, 255, 0)
Else
If TextBox57.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox58.Value = "v" Then
TextBox58.BackColor = RGB(0, 255, 0)
Else
If TextBox58.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox59.Value = "v" Then
TextBox59.BackColor = RGB(0, 255, 0)
Else
If TextBox59.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox60.Value = "v" Then
TextBox60.BackColor = RGB(0, 255, 0)
Else
If TextBox60.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox61.Value = "v" Then
TextBox61.BackColor = RGB(0, 255, 0)
Else
If TextBox61.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox62.Value = "v" Then
TextBox62.BackColor = RGB(0, 255, 0)
Else
If TextBox62.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox63.Value = "v" Then
TextBox63.BackColor = RGB(0, 255, 0)
Else
If TextBox63.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox64.Value = "v" Then
TextBox64.BackColor = RGB(0, 255, 0)
Else
If TextBox64.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox65.Value = "v" Then
TextBox65.BackColor = RGB(0, 255, 0)
Else
If TextBox65.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox66.Value = "v" Then
TextBox66.BackColor = RGB(0, 255, 0)
Else
If TextBox66.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox67.Value = "v" Then
TextBox67.BackColor = RGB(0, 255, 0)
Else
If TextBox67.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox68.Value = "v" Then
TextBox68.BackColor = RGB(0, 255, 0)
Else
If TextBox68.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox69.Value = "v" Then
TextBox69.BackColor = RGB(0, 255, 0)
Else
If TextBox69.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox70.Value = "v" Then
TextBox70.BackColor = RGB(0, 255, 0)
Else
If TextBox70.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox71.Value = "v" Then
TextBox71.BackColor = RGB(0, 255, 0)
Else
If TextBox71.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox72.Value = "v" Then
TextBox72.BackColor = RGB(0, 255, 0)
Else
If TextBox72.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox73.Value = "v" Then
TextBox73.BackColor = RGB(0, 255, 0)
Else
If TextBox73.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox74.Value = "v" Then
TextBox74.BackColor = RGB(0, 255, 0)
Else
If TextBox74.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox75.Value = "v" Then
TextBox75.BackColor = RGB(0, 255, 0)
Else
If TextBox75.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox76.Value = "v" Then
TextBox76.BackColor = RGB(0, 255, 0)
Else
If TextBox76.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox77.Value = "v" Then
TextBox77.BackColor = RGB(0, 255, 0)
Else
If TextBox77.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox78.Value = "v" Then
TextBox78.BackColor = RGB(0, 255, 0)
Else
If TextBox78.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox79.Value = "v" Then
TextBox79.BackColor = RGB(0, 255, 0)
Else
If TextBox79.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox80.Value = "v" Then
TextBox80.BackColor = RGB(0, 255, 0)
Else
If TextBox80.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox81.Value = "v" Then
TextBox81.BackColor = RGB(0, 255, 0)
Else
If TextBox81.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox82.Value = "v" Then
TextBox82.BackColor = RGB(0, 255, 0)
Else
If TextBox82.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox83.Value = "v" Then
TextBox83.BackColor = RGB(0, 255, 0)
Else
If TextBox83.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox84.Value = "v" Then
TextBox84.BackColor = RGB(0, 255, 0)
Else
If TextBox84.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox85.Value = "v" Then
TextBox85.BackColor = RGB(0, 255, 0)
Else
If TextBox85.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox86.Value = "v" Then
TextBox86.BackColor = RGB(0, 255, 0)
Else
If TextBox86.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox87.Value = "v" Then
TextBox87.BackColor = RGB(0, 255, 0)
Else
If TextBox87.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox88.Value = "v" Then
TextBox88.BackColor = RGB(0, 255, 0)
Else
If TextBox88.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox89.Value = "v" Then
TextBox89.BackColor = RGB(0, 255, 0)
Else
If TextBox89.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox90.Value = "v" Then
TextBox90.BackColor = RGB(0, 255, 0)
Else
If TextBox90.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox91.Value = "v" Then
TextBox91.BackColor = RGB(0, 255, 0)
Else
If TextBox91.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox92.Value = "v" Then
TextBox92.BackColor = RGB(0, 255, 0)
Else
If TextBox92.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox93.Value = "v" Then
TextBox93.BackColor = RGB(0, 255, 0)
Else
If TextBox93.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox94.Value = "v" Then
TextBox94.BackColor = RGB(0, 255, 0)
Else
If TextBox94.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox95.Value = "v" Then
TextBox95.BackColor = RGB(0, 255, 0)
Else
If TextBox95.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox96.Value = "v" Then
TextBox96.BackColor = RGB(0, 255, 0)
Else
If TextBox96.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox97.Value = "v" Then
TextBox97.BackColor = RGB(0, 255, 0)
Else
If TextBox97.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox98.Value = "v" Then
TextBox98.BackColor = RGB(0, 255, 0)
Else
If TextBox98.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox99.Value = "v" Then
TextBox99.BackColor = RGB(0, 255, 0)
Else
If TextBox99.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox100.Value = "v" Then
TextBox100.BackColor = RGB(0, 255, 0)
Else
If TextBox100.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If


If TextBox101.Value = "v" Then
TextBox101.BackColor = RGB(0, 255, 0)
Else
If TextBox101.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox102.Value = "v" Then
TextBox102.BackColor = RGB(0, 255, 0)
Else
If TextBox102.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox103.Value = "v" Then
TextBox103.BackColor = RGB(0, 255, 0)
Else
If TextBox103.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox104.Value = "v" Then
TextBox104.BackColor = RGB(0, 255, 0)
Else
If TextBox104.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox105.Value = "v" Then
TextBox105.BackColor = RGB(0, 255, 0)
Else
If TextBox105.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox106.Value = "v" Then
TextBox106.BackColor = RGB(0, 255, 0)
Else
If TextBox106.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox107.Value = "v" Then
TextBox107.BackColor = RGB(0, 255, 0)
Else
If TextBox107.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox108.Value = "v" Then
TextBox108.BackColor = RGB(0, 255, 0)
Else
If TextBox108.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox109.Value = "v" Then
TextBox109.BackColor = RGB(0, 255, 0)
Else
If TextBox109.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox110.Value = "v" Then
TextBox110.BackColor = RGB(0, 255, 0)
Else
If TextBox110.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox111.Value = "v" Then
TextBox111.BackColor = RGB(0, 255, 0)
Else
If TextBox111.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox112.Value = "v" Then
TextBox112.BackColor = RGB(0, 255, 0)
Else
If TextBox112.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox113.Value = "v" Then
TextBox113.BackColor = RGB(0, 255, 0)
Else
If TextBox113.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox114.Value = "v" Then
TextBox114.BackColor = RGB(0, 255, 0)
Else
If TextBox114.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox115.Value = "v" Then
TextBox115.BackColor = RGB(0, 255, 0)
Else
If TextBox115.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox116.Value = "v" Then
TextBox116.BackColor = RGB(0, 255, 0)
Else
If TextBox116.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox117.Value = "v" Then
TextBox117.BackColor = RGB(0, 255, 0)
Else
If TextBox117.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox118.Value = "v" Then
TextBox118.BackColor = RGB(0, 255, 0)
Else
If TextBox118.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox119.Value = "v" Then
TextBox119.BackColor = RGB(0, 255, 0)
Else
If TextBox119.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox120.Value = "v" Then
TextBox120.BackColor = RGB(0, 255, 0)
Else
If TextBox120.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox121.Value = "v" Then
TextBox121.BackColor = RGB(0, 255, 0)
Else
If TextBox121.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox122.Value = "v" Then
TextBox122.BackColor = RGB(0, 255, 0)
Else
If TextBox122.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox123.Value = "v" Then
TextBox123.BackColor = RGB(0, 255, 0)
Else
If TextBox123.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox124.Value = "v" Then
TextBox124.BackColor = RGB(0, 255, 0)
Else
If TextBox124.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox125.Value = "v" Then
TextBox125.BackColor = RGB(0, 255, 0)
Else
If TextBox125.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox126.Value = "v" Then
TextBox126.BackColor = RGB(0, 255, 0)
Else
If TextBox126.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox127.Value = "v" Then
TextBox127.BackColor = RGB(0, 255, 0)
Else
If TextBox127.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox128.Value = "v" Then
TextBox128.BackColor = RGB(0, 255, 0)
Else
If TextBox128.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox129.Value = "v" Then
TextBox129.BackColor = RGB(0, 255, 0)
Else
If TextBox129.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox130.Value = "v" Then
TextBox130.BackColor = RGB(0, 255, 0)
Else
If TextBox130.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox131.Value = "v" Then
TextBox131.BackColor = RGB(0, 255, 0)
Else
If TextBox131.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox132.Value = "v" Then
TextBox132.BackColor = RGB(0, 255, 0)
Else
If TextBox132.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox133.Value = "v" Then
TextBox133.BackColor = RGB(0, 255, 0)
Else
If TextBox133.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox134.Value = "v" Then
TextBox134.BackColor = RGB(0, 255, 0)
Else
If TextBox134.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox135.Value = "v" Then
TextBox135.BackColor = RGB(0, 255, 0)
Else
If TextBox135.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox136.Value = "v" Then
TextBox136.BackColor = RGB(0, 255, 0)
Else
If TextBox136.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox137.Value = "v" Then
TextBox137.BackColor = RGB(0, 255, 0)
Else
If TextBox137.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox138.Value = "v" Then
TextBox138.BackColor = RGB(0, 255, 0)
Else
If TextBox138.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox139.Value = "v" Then
TextBox139.BackColor = RGB(0, 255, 0)
Else
If TextBox139.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox140.Value = "v" Then
TextBox140.BackColor = RGB(0, 255, 0)
Else
If TextBox140.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox141.Value = "v" Then
TextBox141.BackColor = RGB(0, 255, 0)
Else
If TextBox141.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox142.Value = "v" Then
TextBox142.BackColor = RGB(0, 255, 0)
Else
If TextBox142.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox143.Value = "v" Then
TextBox143.BackColor = RGB(0, 255, 0)
Else
If TextBox143.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox144.Value = "v" Then
TextBox144.BackColor = RGB(0, 255, 0)
Else
If TextBox144.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox145.Value = "v" Then
TextBox145.BackColor = RGB(0, 255, 0)
Else
If TextBox145.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox146.Value = "v" Then
TextBox146.BackColor = RGB(0, 255, 0)
Else
If TextBox146.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox147.Value = "v" Then
TextBox147.BackColor = RGB(0, 255, 0)
Else
If TextBox147.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox148.Value = "v" Then
TextBox148.BackColor = RGB(0, 255, 0)
Else
If TextBox148.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox149.Value = "v" Then
TextBox149.BackColor = RGB(0, 255, 0)
Else
If TextBox149.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox150.Value = "v" Then
TextBox150.BackColor = RGB(0, 255, 0)
Else
If TextBox150.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox151.Value = "v" Then
TextBox151.BackColor = RGB(0, 255, 0)
Else
If TextBox151.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox152.Value = "v" Then
TextBox152.BackColor = RGB(0, 255, 0)
Else
If TextBox152.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox153.Value = "v" Then
TextBox153.BackColor = RGB(0, 255, 0)
Else
If TextBox153.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox154.Value = "v" Then
TextBox154.BackColor = RGB(0, 255, 0)
Else
If TextBox154.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox155.Value = "v" Then
TextBox155.BackColor = RGB(0, 255, 0)
Else
If TextBox155.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox156.Value = "v" Then
TextBox156.BackColor = RGB(0, 255, 0)
Else
If TextBox156.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox157.Value = "v" Then
TextBox157.BackColor = RGB(0, 255, 0)
Else
If TextBox157.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox158.Value = "v" Then
TextBox158.BackColor = RGB(0, 255, 0)
Else
If TextBox158.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox159.Value = "v" Then
TextBox159.BackColor = RGB(0, 255, 0)
Else
If TextBox159.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox160.Value = "v" Then
TextBox160.BackColor = RGB(0, 255, 0)
Else
If TextBox160.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox161.Value = "v" Then
TextBox161.BackColor = RGB(0, 255, 0)
Else
If TextBox161.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox162.Value = "v" Then
TextBox162.BackColor = RGB(0, 255, 0)
Else
If TextBox162.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox163.Value = "v" Then
TextBox163.BackColor = RGB(0, 255, 0)
Else
If TextBox163.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox164.Value = "v" Then
TextBox164.BackColor = RGB(0, 255, 0)
Else
If TextBox164.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox165.Value = "v" Then
TextBox165.BackColor = RGB(0, 255, 0)
Else
If TextBox165.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox166.Value = "v" Then
TextBox166.BackColor = RGB(0, 255, 0)
Else
If TextBox166.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox167.Value = "v" Then
TextBox167.BackColor = RGB(0, 255, 0)
Else
If TextBox167.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox168.Value = "v" Then
TextBox168.BackColor = RGB(0, 255, 0)
Else
If TextBox168.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox169.Value = "v" Then
TextBox169.BackColor = RGB(0, 255, 0)
Else
If TextBox169.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox170.Value = "v" Then
TextBox170.BackColor = RGB(0, 255, 0)
Else
If TextBox170.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox171.Value = "v" Then
TextBox171.BackColor = RGB(0, 255, 0)
Else
If TextBox171.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox172.Value = "v" Then
TextBox172.BackColor = RGB(0, 255, 0)
Else
If TextBox172.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox173.Value = "v" Then
TextBox173.BackColor = RGB(0, 255, 0)
Else
If TextBox173.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox174.Value = "v" Then
TextBox174.BackColor = RGB(0, 255, 0)
Else
If TextBox174.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox175.Value = "v" Then
TextBox175.BackColor = RGB(0, 255, 0)
Else
If TextBox175.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox176.Value = "v" Then
TextBox176.BackColor = RGB(0, 255, 0)
Else
If TextBox176.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox177.Value = "v" Then
TextBox177.BackColor = RGB(0, 255, 0)
Else
If TextBox177.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox178.Value = "v" Then
TextBox178.BackColor = RGB(0, 255, 0)
Else
If TextBox178.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox179.Value = "v" Then
TextBox179.BackColor = RGB(0, 255, 0)
Else
If TextBox179.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox180.Value = "v" Then
TextBox180.BackColor = RGB(0, 255, 0)
Else
If TextBox180.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox181.Value = "v" Then
TextBox181.BackColor = RGB(0, 255, 0)
Else
If TextBox181.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox182.Value = "v" Then
TextBox182.BackColor = RGB(0, 255, 0)
Else
If TextBox182.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox183.Value = "v" Then
TextBox183.BackColor = RGB(0, 255, 0)
Else
If TextBox183.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox184.Value = "v" Then
TextBox184.BackColor = RGB(0, 255, 0)
Else
If TextBox184.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox185.Value = "v" Then
TextBox185.BackColor = RGB(0, 255, 0)
Else
If TextBox185.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox186.Value = "v" Then
TextBox186.BackColor = RGB(0, 255, 0)
Else
If TextBox186.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox187.Value = "v" Then
TextBox187.BackColor = RGB(0, 255, 0)
Else
If TextBox187.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox188.Value = "v" Then
TextBox188.BackColor = RGB(0, 255, 0)
Else
If TextBox188.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox189.Value = "v" Then
TextBox189.BackColor = RGB(0, 255, 0)
Else
If TextBox189.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox190.Value = "v" Then
TextBox190.BackColor = RGB(0, 255, 0)
Else
If TextBox190.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox191.Value = "v" Then
TextBox191.BackColor = RGB(0, 255, 0)
Else
If TextBox191.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox192.Value = "v" Then
TextBox192.BackColor = RGB(0, 255, 0)
Else
If TextBox192.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox193.Value = "v" Then
TextBox193.BackColor = RGB(0, 255, 0)
Else
If TextBox193.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox194.Value = "v" Then
TextBox194.BackColor = RGB(0, 255, 0)
Else
If TextBox194.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox195.Value = "v" Then
TextBox195.BackColor = RGB(0, 255, 0)
Else
If TextBox195.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox196.Value = "v" Then
TextBox196.BackColor = RGB(0, 255, 0)
Else
If TextBox196.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox197.Value = "v" Then
TextBox197.BackColor = RGB(0, 255, 0)
Else
If TextBox197.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox198.Value = "v" Then
TextBox198.BackColor = RGB(0, 255, 0)
Else
If TextBox198.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox199.Value = "v" Then
TextBox199.BackColor = RGB(0, 255, 0)
Else
If TextBox199.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox200.Value = "v" Then
TextBox200.BackColor = RGB(0, 255, 0)
Else
If TextBox200.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If


If TextBox201.Value = "v" Then
TextBox201.BackColor = RGB(0, 255, 0)
Else
If TextBox201.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox202.Value = "v" Then
TextBox202.BackColor = RGB(0, 255, 0)
Else
If TextBox202.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox203.Value = "v" Then
TextBox203.BackColor = RGB(0, 255, 0)
Else
If TextBox203.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox204.Value = "v" Then
TextBox204.BackColor = RGB(0, 255, 0)
Else
If TextBox204.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox205.Value = "v" Then
TextBox205.BackColor = RGB(0, 255, 0)
Else
If TextBox205.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox206.Value = "v" Then
TextBox206.BackColor = RGB(0, 255, 0)
Else
If TextBox206.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox207.Value = "v" Then
TextBox207.BackColor = RGB(0, 255, 0)
Else
If TextBox207.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox208.Value = "v" Then
TextBox208.BackColor = RGB(0, 255, 0)
Else
If TextBox1208.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox209.Value = "v" Then
TextBox209.BackColor = RGB(0, 255, 0)
Else
If TextBox209.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox210.Value = "v" Then
TextBox210.BackColor = RGB(0, 255, 0)
Else
If TextBox210.Value = "c" Then
TextBox210.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox211.Value = "v" Then
TextBox211.BackColor = RGB(0, 255, 0)
Else
If TextBox211.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox212.Value = "v" Then
TextBox212.BackColor = RGB(0, 255, 0)
Else
If TextBox212.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox213.Value = "v" Then
TextBox213.BackColor = RGB(0, 255, 0)
Else
If TextBox213.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox214.Value = "v" Then
TextBox214.BackColor = RGB(0, 255, 0)
Else
If TextBox214.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox215.Value = "v" Then
TextBox215.BackColor = RGB(0, 255, 0)
Else
If TextBox215.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox216.Value = "v" Then
TextBox216.BackColor = RGB(0, 255, 0)
Else
If TextBox216.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox217.Value = "v" Then
TextBox217.BackColor = RGB(0, 255, 0)
Else
If TextBox217.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox218.Value = "v" Then
TextBox218.BackColor = RGB(0, 255, 0)
Else
If TextBox218.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox219.Value = "v" Then
TextBox219.BackColor = RGB(0, 255, 0)
Else
If TextBox219.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox220.Value = "v" Then
TextBox220.BackColor = RGB(0, 255, 0)
Else
If TextBox220.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox221.Value = "v" Then
TextBox221.BackColor = RGB(0, 255, 0)
Else
If TextBox221.Value = "c" Then
TextBox221.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox222.Value = "v" Then
TextBox222.BackColor = RGB(0, 255, 0)
Else
If TextBox222.Value = "c" Then
TextBox222.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox223.Value = "v" Then
TextBox223.BackColor = RGB(0, 255, 0)
Else
If TextBox223.Value = "c" Then
TextBox223.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox224.Value = "v" Then
TextBox224.BackColor = RGB(0, 255, 0)
Else
If TextBox224.Value = "c" Then
TextBox224.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox225.Value = "v" Then
TextBox225.BackColor = RGB(0, 255, 0)
Else
If TextBox225.Value = "c" Then
TextBox225.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox226.Value = "v" Then
TextBox226.BackColor = RGB(0, 255, 0)
Else
If TextBox226.Value = "c" Then
TextBox226.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox227.Value = "v" Then
TextBox227.BackColor = RGB(0, 255, 0)
Else
If TextBox227.Value = "c" Then
TextBox227.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox228.Value = "v" Then
TextBox228.BackColor = RGB(0, 255, 0)
Else
If TextBox228.Value = "c" Then
TextBox228.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox229.Value = "v" Then
TextBox229.BackColor = RGB(0, 255, 0)
Else
If TextBox229.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox230.Value = "v" Then
TextBox230.BackColor = RGB(0, 255, 0)
Else
If TextBox230.Value = "c" Then
TextBox230.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox231.Value = "v" Then
TextBox231.BackColor = RGB(0, 255, 0)
Else
If TextBox231.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox232.Value = "v" Then
TextBox232.BackColor = RGB(0, 255, 0)
Else
If TextBox232.Value = "c" Then
TextBox232.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox233.Value = "v" Then
TextBox233.BackColor = RGB(0, 255, 0)
Else
If TextBox233.Value = "c" Then
TextBox233.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox234.Value = "v" Then
TextBox234.BackColor = RGB(0, 255, 0)
Else
If TextBox234.Value = "c" Then
TextBox234.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox235.Value = "v" Then
TextBox235.BackColor = RGB(0, 255, 0)
Else
If TextBox235.Value = "c" Then
TextBox235.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox236.Value = "v" Then
TextBox236.BackColor = RGB(0, 255, 0)
Else
If TextBox236.Value = "c" Then
TextBox236.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox237.Value = "v" Then
TextBox237.BackColor = RGB(0, 255, 0)
Else
If TextBox237.Value = "c" Then
TextBox237.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox238.Value = "v" Then
TextBox238.BackColor = RGB(0, 255, 0)
Else
If TextBox238.Value = "c" Then
TextBox238.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox239.Value = "v" Then
TextBox239.BackColor = RGB(0, 255, 0)
Else
If TextBox239.Value = "c" Then
TextBox239.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox240.Value = "v" Then
TextBox240.BackColor = RGB(0, 255, 0)
Else
If TextBox240.Value = "c" Then
TextBox240.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox241.Value = "v" Then
TextBox241.BackColor = RGB(0, 255, 0)
Else
If TextBox241.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox242.Value = "v" Then
TextBox242.BackColor = RGB(0, 255, 0)
Else
If TextBox242.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox243.Value = "v" Then
TextBox243.BackColor = RGB(0, 255, 0)
Else
If TextBox243.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox244.Value = "v" Then
TextBox244.BackColor = RGB(0, 255, 0)
Else
If TextBox2444.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox245.Value = "v" Then
TextBox245.BackColor = RGB(0, 255, 0)
Else
If TextBox245Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox246.Value = "v" Then
TextBox246.BackColor = RGB(0, 255, 0)
Else
If TextBox246Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox247.Value = "v" Then
TextBox247.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox248.Value = "v" Then
TextBox248.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox249.Value = "v" Then
TextBox249.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox250.Value = "v" Then
TextBox250.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox251.Value = "v" Then
TextBox251.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox252.Value = "v" Then
TextBox252.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox253.Value = "v" Then
TextBox253.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox254.Value = "v" Then
TextBox254.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox255.Value = "v" Then
TextBox255.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox256.Value = "v" Then
TextBox256.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox257.Value = "v" Then
TextBox257.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox258.Value = "v" Then
TextBox258.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox259.Value = "v" Then
TextBox259.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox260.Value = "v" Then
TextBox260.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox261.Value = "v" Then
TextBox261.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox262.Value = "v" Then
TextBox262.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If

End If

If TextBox263.Value = "v" Then
TextBox263.BackColor = RGB(0, 255, 0)
Else
If TextBox1.Value


EDIT: Ajout de la coloration syntaxique.

8 réponses

Messages postés
16033
Date d'inscription
dimanche 25 novembre 2007
Statut
Membre
Dernière intervention
20 octobre 2021
1 548
Bonjour,

    'boucle couleur
    For NT = 1 To 376
        If Me.Control("TextBox" & NT).Value = "v" Then
            Me.Control("TextBox" & NT).BackColor = RGB(0, 255, 0)
        ElseIf Me.Control("TextBox" & NT).Value = "c" Then
            TextBox1.BackColor = RGB(255, 0, 0)
        End If
    Next NT


Si ce qui est en gras n'est qu'une erreur de copier/coller
If TextBox2.Value = "v" Then
TextBox2.BackColor = RGB(0, 255, 0)
Else
If <gras>TextBox2.Value</gras> = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If
End If
'
If TextBox248.Value = "v" Then
TextBox248.BackColor = RGB(0, 255, 0)
Else
If <gras>TextBox1.Value</gras> = "c" Then
TextBox1.BackColor = RGB(255, 0, 0)
End If


pour le remplissage des textbox, ca suit

A+
Oh merci infiniment, cela m'aide déjà beaucoup !

cependant j'ai déja un message d'erreur :
"Membre de éthode ou de données introuvable"

portant sur le code : If Me.Control("TextBox"
le "Control" est mis en évidence
> hartarus
probablement une faute d'écriture, il manquait un "s" à control(s)
le problème est résolu,
J'attends avec impatience la boucle pour les textbox

Merci encore
Messages postés
16525
Date d'inscription
lundi 12 septembre 2005
Statut
Contributeur
Dernière intervention
18 octobre 2021
3 231
Bonjour,

un début mais sans le classeur impossible de tester, donc ...
Dim Cptr As Integer, T_in, Col As Byte, Lig As Byte
'mémorise la feuille en RAm
T_in = Sheets("vacances").Range("C3:N33")

For Cptr = 1 To 371
For Col = 1 To 12
For Lig = 1 To 33
Me.Controls("TextBox" & Cptr) = T_in(Lig, Col)
If Cptr <= 263 Then
If T_in(Lig, Col) = "c" Then TextBox1.BackColor = RGB(255, 0, 0)
If T_in(Lig, Col) = "v" Then TextBox1.BackColor = RGB(255, 0, 0)
End If
Next
Next Cptr
With Sheets("vacances")
TextBox373 = .Range("C38")
TextBox375 = .Range("C40")
TextBox376 = .Range("C43")
End With



Au besoin, mettre le classeur sans données confidentielles en pièce jointe sur https://www.cjoint.com/
et coller le lien proposé dans le message de réponse
Dans l'attente

Michel
Messages postés
16033
Date d'inscription
dimanche 25 novembre 2007
Statut
Membre
Dernière intervention
20 octobre 2021
1 548
Re,

bonjour michel_m

pour l'erreur, ma faute, ai oublie un "s" a control

corrige dessous:

une autre facon de faire

Private Sub UserForm_Initialize()
    With Sheets("vacances")
        'boucle colonnes
        For Col = 1 To 11
            LCol = Choose(Col, "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M")
            Lig = 2
            OF7 = 31 * (Col - 1)
            'boucle TexBox
            For TB = 1 To 31
                NL = Lig + TB
                Me.Controls("TextBox" & OF7 + TB).Value = .Range(LCol & NL).Text
            Next TB
        Next Col
        TextBox373.Value = .Range("C38").Text
        TextBox374.Value = .Range("C39").Text
        TextBox375.Value = .Range("C40").Text
        TextBox376.Value = .Range("C43").Text
    End With
    'boucle couleur
    For NT = 1 To 376
        If Me.Controls("TextBox" & NT).Value = "v" Then
            Me.Controls("TextBox" & NT).BackColor = RGB(0, 255, 0)
        ElseIf Me.Controls("TextBox" & NT).Value = "c" Then
            TextBox1.BackColor = RGB(255, 0, 0)     '?????????????????????
        End If
    Next NT
End Sub
Messages postés
12257
Date d'inscription
jeudi 15 mai 2008
Statut
Modérateur
Dernière intervention
3 septembre 2021
2 653
Bonjour tout le monde,

376 textbox dans un UserForm???
Pour n'y inscire que des v ou des c???
N'y a t'il pas moyen de repenser le fichier?

Sinon, pour ajouter ma touche, à la solution de f894009, je penses qu'une seule boucle devrait suffire. La boucle couleur devrait être intégrée à la boucle colonne. Mais il est vrai que cela reste du détail.
Messages postés
16525
Date d'inscription
lundi 12 septembre 2005
Statut
Contributeur
Dernière intervention
18 octobre 2021
3 231
Bonjour
La boucle couleur devrait être intégrée à la boucle colonne
et qu"est ce que j'ai fait ?
décidément...

Abandon de la discussion
Messages postés
16033
Date d'inscription
dimanche 25 novembre 2007
Statut
Membre
Dernière intervention
20 octobre 2021
1 548 >
Messages postés
16525
Date d'inscription
lundi 12 septembre 2005
Statut
Contributeur
Dernière intervention
18 octobre 2021

Re,

je compatis, par contre, y a probleme sur le changement de couleur textbox.
Meme dans le code d'origine y a un bleme, textbox1 a 376 ="v" .BackColor = RGB(0, 255, 0) mais si textbox1 a 376 ="c" c'est seulement TextBox1 qui change de couleur !!!!!!!!!!
Messages postés
12257
Date d'inscription
jeudi 15 mai 2008
Statut
Modérateur
Dernière intervention
3 septembre 2021
2 653 >
Messages postés
16525
Date d'inscription
lundi 12 septembre 2005
Statut
Contributeur
Dernière intervention
18 octobre 2021

Bon...
@Michel : c'est pourquoi j'ai bien mis dans ma réponse : à la solution de f894009. Je ne parlais pas de ta solution.
Pour en revenir à ta solution, je ne penses pas qu'une triple boucle soit nécessaire.
A partir de ton code (version écrite sur le site et donc non testée) :

Dim Cptr As Integer, T_in, Col As Byte, Lig As Byte
 'mémorise la feuille en RAm
    T_in = Sheets("vacances").Range("C3:N33")
    Col = 3
    Lig = 3
    For Cptr = 1 To 372
        Me.Controls("TextBox" & Cptr) = T_in(Lig - 2, Col - 2)
        If T_in(Lig - 2, Col - 2) = "c" Then Me.Controls("TextBox" & Cptr).BackColor = RGB(255, 0, 0)
        If T_in(Lig - 2, Col - 2) = "v" Then Me.Controls("TextBox" & Cptr).BackColor = RGB(255, 0, 0)
        Lig = Lig + 1
        If Lig = 34 Then Lig = 3: Col = Col + 1
    Next Cptr
    With Sheets("vacances")
        TextBox373 = .Range("C38")
        TextBox375 = .Range("C40")
        TextBox376 = .Range("C43")
    End With


Mais je le répète, je ne procèderais pas de la sorte à la place du demandeur...
Je ne comprends pas l'utilité de tous ces textboxs pour ne rien y saisir... que des v et des c.
Messages postés
16525
Date d'inscription
lundi 12 septembre 2005
Statut
Contributeur
Dernière intervention
18 octobre 2021
3 231 >
Messages postés
12257
Date d'inscription
jeudi 15 mai 2008
Statut
Modérateur
Dernière intervention
3 septembre 2021

lorsqu'une variable tablreau est lancée avec plusieurs colonnes, l'index et le champ de départ sont à 1 pourquoi utiliser les repères de lignes et de colonnes ?
Dans le code, la mise en couleur "c" "v" s'arr^te à 263.... bizarre d'accord mais je n'ai que ce qui est écrit pour bosser; faire autrement n'est que de l'interprétation...
concernant le coup du "c" qui met en rouge dès qu'il y en a 1, j'aurais du employer au départ "application.count.If(;;;;;"

d'autre utiliser les cellules sur ce tableau de 33 lignes sur 12 colonnes risque d'être lent surtout sans figer l'écran au départ
A savoir:
en début de procédure écrire cette astuce bien connue:
application.screenupdating=false

pourquoi pas loin de 400 textbox est bizarre aussi mais notre ami est débutant et on ne sait pas ce qui est demandé
Je vous laisse
Re-bonjour, merci d'ores et déja pour vottre assiduité a m'aider a résoudre ce problème.

Pour commencer, l'usf est une sorte de calendrier ou viennent s'afficher les jours de congé ainsi que les jours de vacances, voilà pourquoi 376 ...

ensuite, ce n'est pas que la textbox 1 qui change, mais j'ai pu résoudre ca tout seul :-)

l'affichage des couleurs pour moi ca fonctionne très bien et je vous en remercie !

ce qui me manque ce sont les chargement des textbox, j'ai effectivement plusieurs colones mais les cellules sont de 3 au 33... pour les jours du mois

colone C de 3 à 33
colone D de 3 à 33
....

comment compiler tout ca ?

merci encore une fois à vous tous !
Messages postés
1769
Date d'inscription
lundi 7 avril 2008
Statut
Membre
Dernière intervention
15 juin 2020
642
--
ci-dessous procédure réduite à compléter car je n'ai paramétré que les lignes 12 à 104

Private Sub UserForm_Initialize()

Dim ind_textbox As Integer
Dim r1 As Range
Dim r2 As Range
Dim r3 As Range


For Each contrôle In Controls
If TypeOf contrôle Is MSForms.TextBox Then
Set r1 = Range("C3:C33")
Set r2 = Range("D3:D33")
Set r3 = Range("E3:E33")

ind_textbox = Val(Replace(contrôle.Name, "TextBox", ""))
If ind_textbox >= 1 And ind_textbox <= 31 Then
r1.Rows(ind_textbox).Value = contrôle.Text
End If
If ind_textbox >= 32 And ind_textbox <= 62 Then
r2.Rows(ind_textbox - 31).Value = contrôle.Text
End If
If ind_textbox >= 63 And ind_textbox <= 93 Then
r3.Rows(ind_textbox - 62).Value = contrôle.Text
End If

If contrôle.Value = "v" Then
contrôle.BackColor = RGB(0, 255, 0)
End If
If contrôle.Value = "c" Then
contrôle.BackColor = RGB(255, 0, 0)
End If
End If
Next


End Sub

Cette procédure peut être encore optimisée, mais elle me parait plus abordable pour un débutant
Messages postés
1769
Date d'inscription
lundi 7 avril 2008
Statut
Membre
Dernière intervention
15 juin 2020
642
Procédure optimisée rectifiant mes posts précédents et au final plus simple à comprendre compte-tenu de l'information  complémetaire apportée

Private Sub UserForm_Initialize()

Dim ind_textbox As Integer
Dim calendrier As Range

Set calendrier = Sheets("vacances").Range("C3:N33")
For Each contrôle In Controls

If TypeOf contrôle Is MSForms.TextBox Then
ind_textbox = Val(Replace(contrôle.Name, "TextBox", ""))
mois = ind_textbox \ 31 + 1
jour = ind_textbox Mod 31
calendrier(jour, mois).Value = contrôle.Text

If contrôle.Value = "v" Then
contrôle.BackColor = RGB(0, 255, 0)
End If
If contrôle.Value = "c" Then
contrôle.BackColor = RGB(255, 0, 0)
End If
End If

Next


End Sub





--
Messages postés
1769
Date d'inscription
lundi 7 avril 2008
Statut
Membre
Dernière intervention
15 juin 2020
642
dans la procédure non optimisée,
contrôle.Text = r1.Rows(ind_textbox).Value
et non r1.Rows(ind_textbox).Value = contrôle.Text
etc ...

dans la procédure optimisée,
contrôle.Text = calendrier(jour, mois).Value
calendrier(jour, mois).Value = contrôle.Text
--
Messages postés
1769
Date d'inscription
lundi 7 avril 2008
Statut
Membre
Dernière intervention
15 juin 2020
642
ci-dessous procédure réduite à compléter car je n'ai paramétré que les lignes 12 à104

Private Sub UserForm_Initialize()

Dim ind_textbox As Integer
Dim r1 As Range
Dim r2 As Range
Dim r3 As Range


For Each contrôle In Controls
If TypeOf contrôle Is MSForms.TextBox Then
Set r1 = Sheets("vacances").Range("C3:C33")
Set r2 = Sheets("vacances").Range("D3:D33")
Set r3 = Sheets("vacances").Range("E3:E33")

ind_textbox = Val(Replace(contrôle.Name, "TextBox", ""))
If ind_textbox >= 1 And ind_textbox <= 31 Then
r1.rows(ind_textbox).Value = contrôle.Text
End If
If ind_textbox >= 32 And ind_textbox <= 62 Then
r2.rows(ind_textbox - 31).Value = contrôle.Text
End If
If ind_textbox >= 63 And ind_textbox <= 93 Then
r3.rows(ind_textbox - 62).Value = contrôle.Text
End If

If contrôle.Value = "v" Then
contrôle.BackColor = RGB(0, 255, 0)
End If
If contrôle.Value = "c" Then
contrôle.BackColor = RGB(255, 0, 0)
End If
End If
Next


End Sub


--
Merci infiniment pour cette procédure, à partir de ça je continue a remplir...

effectivement pour le débutant que je suis, ce genre de procédure n'était pas à ma portée.

Au plaisir de vous relire un de ces jours
J'ai remarqué qu'il y avait un problème, la procédure envoie les valeur des textbox dans les cellules de la feuille vacances, seulement j'ai besoin que ca soit l'inverse, les textbox affichent les valeurs des cellules de la feuile vacances, est ce que c'est possible ? est ce qu'il faut juste inverser :

ind_textbox = Val(Replace(...
en
Val(Replace(... =ind_textbox

pour résoudre le problème ?


Private Sub UserForm_Initialize()

Dim ind_textbox As Integer
Dim r1 As Range
Dim r2 As Range
Dim r3 As Range
Dim r4 As Range
Dim r5 As Range
Dim r6 As Range
Dim r7 As Range
Dim r8 As Range
Dim r9 As Range
Dim r10 As Range
Dim r11 As Range
Dim r12 As Range


For Each contrôle In Controls
If TypeOf contrôle Is MSForms.TextBox Then
Set r1 = Sheets("Vacances").Range("C3:C33")
Set r2 = Sheets("Vacances").Range("D3:D33")
Set r3 = Sheets("Vacances").Range("E3:E33")
Set r4 = Sheets("Vacances").Range("F3:F33")
Set r5 = Sheets("Vacances").Range("G3:G33")
Set r6 = Sheets("Vacances").Range("H3:H33")
Set r7 = Sheets("Vacances").Range("I3:I33")
Set r8 = Sheets("Vacances").Range("J3:J33")
Set r9 = Sheets("Vacances").Range("K3:K33")
Set r10 = Sheets("Vacances").Range("L3:L33")
Set r11 = Sheets("Vacances").Range("M3:M33")
Set r12 = Sheets("Vacances").Range("N3:N33")
End If


ind_textbox = Val(Replace(contrôle.Name, "TextBox", ""))
If ind_textbox >= 1 And ind_textbox <= 31 Then
r1.Rows(ind_textbox).Value = contrôle.Text
End If
If ind_textbox >= 32 And ind_textbox <= 62 Then
r2.Rows(ind_textbox - 31).Value = contrôle.Text
End If
If ind_textbox >= 63 And ind_textbox <= 93 Then
r3.Rows(ind_textbox - 62).Value = contrôle.Text
End If
If ind_textbox >= 94 And ind_textbox <= 124 Then
r4.Rows(ind_textbox - 93).Value = contrôle.Text
End If
If ind_textbox >= 125 And ind_textbox <= 155 Then
r5.Rows(ind_textbox - 124).Value = contrôle.Text
End If
If ind_textbox >= 156 And ind_textbox <= 186 Then
r6.Rows(ind_textbox - 155).Value = contrôle.Text
End If
If ind_textbox >= 187 And ind_textbox <= 217 Then
r7.Rows(ind_textbox - 186).Value = contrôle.Text
End If
If ind_textbox >= 218 And ind_textbox <= 248 Then
r8.Rows(ind_textbox - 217).Value = contrôle.Text
End If
If ind_textbox >= 249 And ind_textbox <= 279 Then
r9.Rows(ind_textbox - 248).Value = contrôle.Text
End If
If ind_textbox >= 280 And ind_textbox <= 310 Then
r10.Rows(ind_textbox - 279).Value = contrôle.Text
End If
If ind_textbox >= 311 And ind_textbox <= 341 Then
r11.Rows(ind_textbox - 310).Value = contrôle.Text
End If
If ind_textbox >= 342 And ind_textbox <= 372 Then
r12.Rows(ind_textbox - 341).Value = contrôle.Text
End If
Next
Messages postés
1769
Date d'inscription
lundi 7 avril 2008
Statut
Membre
Dernière intervention
15 juin 2020
642 > Hartarus
dans la procédure non optimisée,
contrôle.Text = r1.Rows(ind_textbox).Value
et non
r1.Rows(ind_textbox).Value = contrôle.Text
etc ...

dans la procédure optimisée,
contrôle.Text = calendrier(jour, mois).Value
et non
calendrier(jour, mois).Value = contrôle.Text

Voilà
--