Excel crashing when entering date in userform

jptaz

New Member
Joined
May 1, 2020
Messages
46
Office Version
  1. 2010
Platform
  1. Windows
Hello everyone, here's my issue.
Since monday, for no apparent reason, when I enter a date in my userform, excel crashes and need to be restarted. I have multiple backup files (even really old files) that share the same problem and last friday, everything worked flawlessly.

The problem seems to occur when I'm doing these steps :
1- opening the file and entering a date in one of the textbox (birthdate for example) (no crash at this point)
2- closing the document after saving
3- opening the same file again and entering a date will make it crash
4- it can happen at beginning or a the end of the entry.
5- it will continue until a change minor thing in the code or if I save the file under a new name, then back to step 1

- My userform contains textboxes fomatted with this date format "yyyy/mm/dd" with a maximum number of caracter allowed
- If I delete the formating code for dates, it seems to work, but you can imagine I hope to keep it the way it was.
- There was no issue until this week and did no change I can think of, specially on older files.
- There is no vba error, just excel crashing
- strangely, I have to date textboxes that never crash, but the code is exactly the same as the others...
- The issue can be reproduce on excel 2010 and 2013 and on other computers

I've researched this issue and came by some code cleaner app. I can't use it at work, but could find a way. Do you think this could work?

Here is my code for adding new file

VBA Code:
Option Explicit
Private oldLength As Integer


Private Sub Combo_dominance_Change()
Combo_dom_preh_ini.Text = Combo_dominance.Text
End Sub




'date de l'évaluation initiale
Private Sub Text_date_eval_ini_Change()
     If (oldLength > Text_date_eval_ini.TextLength) Then
         oldLength = Text_date_eval_ini.TextLength
         Exit Sub
     End If
    Text_date_eval_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_eval_ini.TextLength = 4 Or Text_date_eval_ini.TextLength = 7 Then
    Text_date_eval_ini.Text = Text_date_eval_ini.Text + "/"
     End If
     oldLength = Text_date_eval_ini.TextLength
End Sub

'date de l'évaluation finale
Private Sub Text_date_eval_fin_Change()
If (oldLength > Text_date_eval_fin.TextLength) Then
         oldLength = Text_date_eval_fin.TextLength
         Exit Sub
     End If
    Text_date_eval_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_eval_fin.TextLength = 4 Or Text_date_eval_fin.TextLength = 7 Then
    Text_date_eval_fin.Text = Text_date_eval_fin.Text + "/"
     End If
     oldLength = Text_date_eval_fin.TextLength
End Sub

'birthdate


Private Function DiffDateAMJ(DateDebut As Date, DateFin As Date) As String
Dim NbAns As Long, NbMois As Long, NbJours As Long
Dim Tmp As Date, sA As String, sM As String, sJ As String
 
    Tmp = DateSerial(Year(DateFin), Month(DateDebut), Day(DateDebut))
    NbAns = Year(DateFin) - Year(DateDebut) + (Tmp > DateFin)
    NbMois = Month(DateFin) - Month(DateDebut) - (12 * (Tmp > DateFin))
    NbJours = Day(DateFin) - Day(DateDebut) + 1
 
    If NbJours < 0 Then
        NbMois = NbMois - 1
        NbJours = Day(DateSerial(Year(DateFin), Month(DateFin), 0)) + NbJours
    End If
 
    If NbAns = 0 Then sA = "" Else sA = NbAns & " ans "
    If NbMois = 0 Then sM = "" Else sM = NbMois & "mois "
    If NbJours = 0 Then sJ = "" Else sJ = NbJours & "jours"
 
    DiffDateAMJ = Trim$(sA)
    'DiffDateAMJ = Trim$(sA & sM & sJ) pour avoir ans mois jours
End Function
 


Private Sub Text_ddn_Change()

If (oldLength > Text_ddn.TextLength) Then
         oldLength = Text_ddn.TextLength
         Exit Sub
End If
Text_ddn.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_ddn.TextLength = 4 Or Text_ddn.TextLength = 7 Then
    Text_ddn.Text = Text_ddn.Text + "/"
     End If
     oldLength = Text_ddn.TextLength
     
     If IsDate(Text_ddn.Text) Then
        Text_age.Text = DiffDateAMJ(Text_ddn.Text, Date)
    End If
    

    
End Sub




'date de LEAPA initial
Private Sub Text_date_leapa_ini_Change()
If (oldLength > Text_date_leapa_ini.TextLength) Then
         oldLength = Text_date_leapa_ini.TextLength
         Exit Sub
     End If
    Text_date_leapa_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_leapa_ini.TextLength = 4 Or Text_date_leapa_ini.TextLength = 7 Then
    Text_date_leapa_ini.Text = Text_date_leapa_ini.Text + "/"
     End If
     oldLength = Text_date_leapa_ini.TextLength
End Sub


'date de LEAPA final
Private Sub Text_date_leapa_fin_Change()
If (oldLength > Text_date_leapa_fin.TextLength) Then
         oldLength = Text_date_leapa_fin.TextLength
         Exit Sub
     End If
    Text_date_leapa_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_leapa_fin.TextLength = 4 Or Text_date_leapa_fin.TextLength = 7 Then
    Text_date_leapa_fin.Text = Text_date_leapa_fin.Text + "/"
     End If
     oldLength = Text_date_leapa_fin.TextLength
End Sub





'date de podométrie

Private Sub Text_date_pod_1_ini_Change()
        If (oldLength > Text_date_pod_1_ini.TextLength) Then
         oldLength = Text_date_pod_1_ini.TextLength
         Exit Sub
     End If
    Text_date_pod_1_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_1_ini.TextLength = 4 Or Text_date_pod_1_ini.TextLength = 7 Then
    Text_date_pod_1_ini.Text = Text_date_pod_1_ini.Text + "/"
     End If
     oldLength = Text_date_pod_1_ini.TextLength
   
   End Sub

Private Sub Text_date_pod_2_ini_Change()
     If (oldLength > Text_date_pod_2_ini.TextLength) Then
         oldLength = Text_date_pod_2_ini.TextLength
         Exit Sub
     End If
    Text_date_pod_2_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_2_ini.TextLength = 4 Or Text_date_pod_2_ini.TextLength = 7 Then
    Text_date_pod_2_ini.Text = Text_date_pod_2_ini.Text + "/"
     End If
     oldLength = Text_date_pod_2_ini.TextLength
End Sub


Private Sub Text_date_pod_3_ini_Change()
     If (oldLength > Text_date_pod_3_ini.TextLength) Then
         oldLength = Text_date_pod_3_ini.TextLength
         Exit Sub
     End If
    Text_date_pod_3_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_3_ini.TextLength = 4 Or Text_date_pod_3_ini.TextLength = 7 Then
    Text_date_pod_3_ini.Text = Text_date_pod_3_ini.Text + "/"
     End If
     oldLength = Text_date_pod_3_ini.TextLength
End Sub

Private Sub Text_date_pod_4_ini_Change()
     If (oldLength > Text_date_pod_4_ini.TextLength) Then
         oldLength = Text_date_pod_4_ini.TextLength
         Exit Sub
     End If
    Text_date_pod_4_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_4_ini.TextLength = 4 Or Text_date_pod_4_ini.TextLength = 7 Then
    Text_date_pod_4_ini.Text = Text_date_pod_4_ini.Text + "/"
     End If
     oldLength = Text_date_pod_4_ini.TextLength
End Sub

Private Sub Text_date_pod_5_ini_Change()
     If (oldLength > Text_date_pod_5_ini.TextLength) Then
         oldLength = Text_date_pod_5_ini.TextLength
         Exit Sub
     End If
    Text_date_pod_5_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_5_ini.TextLength = 4 Or Text_date_pod_5_ini.TextLength = 7 Then
    Text_date_pod_5_ini.Text = Text_date_pod_5_ini.Text + "/"
     End If
     oldLength = Text_date_pod_5_ini.TextLength
End Sub

Private Sub Text_date_pod_6_ini_Change()
     If (oldLength > Text_date_pod_6_ini.TextLength) Then
         oldLength = Text_date_pod_6_ini.TextLength
         Exit Sub
     End If
    Text_date_pod_6_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_6_ini.TextLength = 4 Or Text_date_pod_6_ini.TextLength = 7 Then
    Text_date_pod_6_ini.Text = Text_date_pod_6_ini.Text + "/"
     End If
     oldLength = Text_date_pod_6_ini.TextLength
End Sub

Private Sub Text_date_pod_7_ini_Change()
     If (oldLength > Text_date_pod_7_ini.TextLength) Then
         oldLength = Text_date_pod_7_ini.TextLength
         Exit Sub
     End If
    Text_date_pod_7_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_7_ini.TextLength = 4 Or Text_date_pod_7_ini.TextLength = 7 Then
    Text_date_pod_7_ini.Text = Text_date_pod_7_ini.Text + "/"
     End If
     oldLength = Text_date_pod_7_ini.TextLength
End Sub

Private Sub Text_date_pod_8_ini_Change()
     If (oldLength > Text_date_pod_8_ini.TextLength) Then
         oldLength = Text_date_pod_8_ini.TextLength
         Exit Sub
     End If
    Text_date_pod_8_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_8_ini.TextLength = 4 Or Text_date_pod_8_ini.TextLength = 7 Then
    Text_date_pod_8_ini.Text = Text_date_pod_8_ini.Text + "/"
     End If
     oldLength = Text_date_pod_8_ini.TextLength
End Sub

Private Sub Text_date_pod_1_fin_Change()
     If (oldLength > Text_date_pod_1_fin.TextLength) Then
         oldLength = Text_date_pod_1_fin.TextLength
         Exit Sub
     End If
    Text_date_pod_1_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_1_fin.TextLength = 4 Or Text_date_pod_1_fin.TextLength = 7 Then
    Text_date_pod_1_fin.Text = Text_date_pod_1_fin.Text + "/"
     End If
     oldLength = Text_date_pod_1_fin.TextLength
End Sub





Private Sub Text_date_pod_2_fin_Change()
     If (oldLength > Text_date_pod_2_fin.TextLength) Then
         oldLength = Text_date_pod_2_fin.TextLength
         Exit Sub
     End If
    Text_date_pod_2_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_2_fin.TextLength = 4 Or Text_date_pod_2_fin.TextLength = 7 Then
    Text_date_pod_2_fin.Text = Text_date_pod_2_fin.Text + "/"
     End If
     oldLength = Text_date_pod_2_fin.TextLength
End Sub


Private Sub Text_date_pod_3_fin_Change()
     If (oldLength > Text_date_pod_3_fin.TextLength) Then
         oldLength = Text_date_pod_3_fin.TextLength
         Exit Sub
     End If
    Text_date_pod_3_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_3_fin.TextLength = 4 Or Text_date_pod_3_fin.TextLength = 7 Then
    Text_date_pod_3_fin.Text = Text_date_pod_3_fin.Text + "/"
     End If
     oldLength = Text_date_pod_3_fin.TextLength
End Sub


Private Sub Text_date_pod_4_fin_Change()
     If (oldLength > Text_date_pod_4_fin.TextLength) Then
         oldLength = Text_date_pod_4_fin.TextLength
         Exit Sub
     End If
    Text_date_pod_4_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_4_fin.TextLength = 4 Or Text_date_pod_4_fin.TextLength = 7 Then
    Text_date_pod_4_fin.Text = Text_date_pod_4_fin.Text + "/"
     End If
     oldLength = Text_date_pod_4_fin.TextLength
End Sub

Private Sub Text_date_pod_5_fin_Change()
     If (oldLength > Text_date_pod_5_fin.TextLength) Then
         oldLength = Text_date_pod_5_fin.TextLength
         Exit Sub
     End If
    Text_date_pod_5_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_5_fin.TextLength = 4 Or Text_date_pod_5_fin.TextLength = 7 Then
    Text_date_pod_5_fin.Text = Text_date_pod_5_fin.Text + "/"
     End If
     oldLength = Text_date_pod_5_fin.TextLength
End Sub

Private Sub Text_date_pod_6_fin_Change()
     If (oldLength > Text_date_pod_6_fin.TextLength) Then
         oldLength = Text_date_pod_6_fin.TextLength
         Exit Sub
     End If
    Text_date_pod_6_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_6_fin.TextLength = 4 Or Text_date_pod_6_fin.TextLength = 7 Then
    Text_date_pod_6_fin.Text = Text_date_pod_6_fin.Text + "/"
     End If
     oldLength = Text_date_pod_6_fin.TextLength
End Sub

Private Sub Text_date_pod_7_fin_Change()
     If (oldLength > Text_date_pod_7_fin.TextLength) Then
         oldLength = Text_date_pod_7_fin.TextLength
         Exit Sub
     End If
    Text_date_pod_7_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_7_fin.TextLength = 4 Or Text_date_pod_7_fin.TextLength = 7 Then
    Text_date_pod_7_fin.Text = Text_date_pod_7_fin.Text + "/"
     End If
     oldLength = Text_date_pod_7_fin.TextLength
End Sub



Private Sub Text_date_pod_8_fin_Change()
     If (oldLength > Text_date_pod_8_fin.TextLength) Then
         oldLength = Text_date_pod_8_fin.TextLength
         Exit Sub
     End If
    Text_date_pod_8_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_date_pod_8_fin.TextLength = 4 Or Text_date_pod_8_fin.TextLength = 7 Then
    Text_date_pod_8_fin.Text = Text_date_pod_8_fin.Text + "/"
     End If
     oldLength = Text_date_pod_8_fin.TextLength
End Sub










Private Sub Text_TA_repos_ini_Change()
 If (oldLength > Text_TA_repos_ini.TextLength) Then
         oldLength = Text_TA_repos_ini.TextLength
         Exit Sub
     End If
     
 Text_TA_repos_ini.MaxLength = 7    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_TA_repos_ini.TextLength = 3 Then
    Text_TA_repos_ini.Text = Text_TA_repos_ini.Text + "/"
     End If
     oldLength = Text_TA_repos_ini.TextLength



End Sub

Private Sub Text_TA_repos_fin_Change()
 If (oldLength > Text_TA_repos_fin.TextLength) Then
         oldLength = Text_TA_repos_fin.TextLength
         Exit Sub
     End If
     
 Text_TA_repos_fin.MaxLength = 7    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_TA_repos_fin.TextLength = 3 Then
    Text_TA_repos_fin.Text = Text_TA_repos_fin.Text + "/"
     End If
     oldLength = Text_TA_repos_fin.TextLength



End Sub








'Équilibre unipodal disable >45 sec


Private Sub Text_equi_g1_ini_Change()
If Text_equi_g1_ini.Value >= "45" Or Text_equi_g2_ini.Value >= "45" Or Text_equi_g3_ini.Value >= "45" Then
Combo_45sg_ini.Enabled = True
Combo_45sg_ini.BackColor = "&H80000005"
Else
Combo_45sg_ini.Enabled = False
Combo_45sg_ini.BackColor = "&H80000004"
End If
End Sub

Private Sub Text_equi_g2_ini_Change()
If Text_equi_g1_ini.Value >= "45" Or Text_equi_g2_ini.Value >= "45" Or Text_equi_g3_ini.Value >= "45" Then
Combo_45sg_ini.Enabled = True
Combo_45sg_ini.BackColor = "&H80000005"
Else
Combo_45sg_ini.Enabled = False
Combo_45sg_ini.BackColor = "&H80000004"
End If
End Sub

Private Sub Text_equi_g3_ini_Change()
If Text_equi_g1_ini.Value >= "45" Or Text_equi_g2_ini.Value >= "45" Or Text_equi_g3_ini.Value >= "45" Then
Combo_45sg_ini.Enabled = True
Combo_45sg_ini.BackColor = "&H80000005"
Else
Combo_45sg_ini.Enabled = False
Combo_45sg_ini.BackColor = "&H80000004"
End If
End Sub



Private Sub Text_equi_d1_ini_Change()
If Text_equi_d1_ini.Value >= "45" Or Text_equi_d2_ini.Value >= "45" Or Text_equi_d3_ini.Value >= "45" Then
Combo_45sd_ini.Enabled = True
Combo_45sd_ini.BackColor = "&H80000005"
Else
Combo_45sd_ini.Enabled = False
Combo_45sd_ini.BackColor = "&H80000004"
End If
End Sub

Private Sub Text_equi_d2_ini_Change()
If Text_equi_d1_ini.Value >= "45" Or Text_equi_d2_ini.Value >= "45" Or Text_equi_d3_ini.Value >= "45" Then
Combo_45sd_ini.Enabled = True
Combo_45sd_ini.BackColor = "&H80000005"
Else
Combo_45sd_ini.Enabled = False
Combo_45sd_ini.BackColor = "&H80000004"
End If
End Sub

Private Sub Text_equi_d3_ini_Change()
If Text_equi_d1_ini.Value >= "45" Or Text_equi_d2_ini.Value >= "45" Or Text_equi_d3_ini.Value >= "45" Then
Combo_45sd_ini.Enabled = True
Combo_45sd_ini.BackColor = "&H80000005"
Else
Combo_45sd_ini.Enabled = False
Combo_45sd_ini.BackColor = "&H80000004"
End If
End Sub

Private Sub Text_equi_g1_fin_Change()
If Text_equi_g1_fin.Value >= "45" Or Text_equi_g2_fin.Value >= "45" Or Text_equi_g3_fin.Value >= "45" Then
Combo_45sg_fin.Enabled = True
Combo_45sg_fin.BackColor = "&H80000005"
Else
Combo_45sg_fin.Enabled = False
Combo_45sg_fin.BackColor = "&H80000004"
End If
End Sub

Private Sub Text_equi_g2_fin_Change()
If Text_equi_g1_fin.Value >= "45" Or Text_equi_g2_fin.Value >= "45" Or Text_equi_g3_fin.Value >= "45" Then
Combo_45sg_fin.Enabled = True
Combo_45sg_fin.BackColor = "&H80000005"
Else
Combo_45sg_fin.Enabled = False
Combo_45sg_fin.BackColor = "&H80000004"
End If
End Sub


Private Sub Text_equi_g3_fin_Change()
If Text_equi_g1_fin.Value >= "45" Or Text_equi_g2_fin.Value >= "45" Or Text_equi_g3_fin.Value >= "45" Then
Combo_45sg_fin.Enabled = True
Combo_45sg_fin.BackColor = "&H80000005"
Else
Combo_45sg_fin.Enabled = False
Combo_45sg_fin.BackColor = "&H80000004"
End If
End Sub

Private Sub Text_equi_d1_fin_Change()
If Text_equi_d1_fin.Value >= "45" Or Text_equi_d2_fin.Value >= "45" Or Text_equi_d3_fin.Value >= "45" Then
Combo_45sd_fin.Enabled = True
Combo_45sd_fin.BackColor = "&H80000005"
Else
Combo_45sd_fin.Enabled = False
Combo_45sd_fin.BackColor = "&H80000004"
End If
End Sub
Private Sub Text_equi_d2_fin_Change()
If Text_equi_d1_fin.Value >= "45" Or Text_equi_d2_fin.Value >= "45" Or Text_equi_d3_fin.Value >= "45" Then
Combo_45sd_fin.Enabled = True
Combo_45sd_fin.BackColor = "&H80000005"
Else
Combo_45sd_fin.Enabled = False
Combo_45sd_fin.BackColor = "&H80000004"
End If
End Sub
Private Sub Text_equi_d3_fin_Change()
If Text_equi_d1_fin.Value >= "45" Or Text_equi_d2_fin.Value >= "45" Or Text_equi_d3_fin.Value >= "45" Then
Combo_45sd_fin.Enabled = True
Combo_45sd_fin.BackColor = "&H80000005"
Else
Combo_45sd_fin.Enabled = False
Combo_45sd_fin.BackColor = "&H80000004"
End If
End Sub



'conversion

Private Sub Text_kg2_Change()
On Error Resume Next
OnlyNumbersconvert
If Text_kg2.Text = "" Then
Text_livres2.Text = ""
Else
Text_livres2.Text = (Text_kg2 * 2.2)
Text_livres2.Value = Format(Text_livres2.Value, "###.##")
End If
End Sub

Private Sub Text_livres1_Change()
On Error Resume Next
OnlyNumbersconvert
If Text_livres1.Value = "" Then
Text_kg1.Text = ""
Else
Text_kg1.Text = (Text_livres1 / 2.2)
Text_kg1.Value = Format(Text_kg1.Value, "###.##")
End If
End Sub






'Date signature rapport initial
Private Sub Text_sign_ini_Change()
If (oldLength > Text_sign_ini.TextLength) Then
         oldLength = Text_sign_ini.TextLength
         Exit Sub
     End If
    Text_sign_ini.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_sign_ini.TextLength = 4 Or Text_sign_ini.TextLength = 7 Then
    Text_sign_ini.Text = Text_sign_ini.Text + "/"
     End If
     oldLength = Text_sign_ini.TextLength
End Sub

'Date signature rapport final
Private Sub Text_sign_fin_Change()
If (oldLength > Text_sign_fin.TextLength) Then
         oldLength = Text_sign_fin.TextLength
         Exit Sub
     End If
    Text_sign_fin.MaxLength = 10    'nb caractères maxi autorisé dans le textbox mettre 8 si tu veux l'année à 2 chiffres
     If Text_sign_fin.TextLength = 4 Or Text_sign_fin.TextLength = 7 Then
   Text_sign_fin.Text = Text_sign_fin.Text + "/"
     End If
     oldLength = Text_sign_fin.TextLength
End Sub

'Changer couleur de fond et vérouiller choix ménopause

Private Sub combo_gender_change()
If Combo_Gender.Text = "Homme" Then
Combo_menopause.BackColor = "&H8000000F"
Combo_menopause.Enabled = False
Combo_menopause.Text = ""
Else: Combo_menopause.BackColor = "&H80000005"
Combo_menopause.Enabled = True
End If
If ((Combo_Gender.Text = "Femme") And (Combo_menopause.Text = "Oui")) Or ((Combo_Gender.Text = "Femme") And (Text_age.Text >= "55 ans") And ((Combo_menopause.Text = "Non") Or (Combo_menopause.Text = ""))) Then
Text_fr_age_ini.Text = "Femme de plus de 55 ans ou ménopausée"
Text_fr_age_fin.Text = "Femme de plus de 55 ans ou ménopausée"
Else
If (Combo_Gender.Text = "Homme") And (Text_age.Text >= "45 ans") Then
Text_fr_age_ini.Text = "Homme de plus de 45 ans"
Text_fr_age_fin.Text = "Homme de plus de 45 ans"
Else
Text_fr_age_ini.Text = ""
Text_fr_age_fin.Text = ""
End If

End If


End Sub




Private Sub Combo_menopause_Change()

If ((Combo_Gender.Text = "Femme") And (Combo_menopause.Text = "Oui")) Or ((Combo_Gender.Text = "Femme") And (Text_age.Text >= "55 ans") And ((Combo_menopause.Text = "Non") Or (Combo_menopause.Text = ""))) Then
Text_fr_age_ini.Text = "Femme de plus de 55 ans ou ménopausée"
Text_fr_age_fin.Text = "Femme de plus de 55 ans ou ménopausée"
Else
If (Combo_Gender.Text = "Homme") And (Text_age.Text >= "45 ans") Then
Text_fr_age_ini.Text = "Homme de plus de 45 ans"
Text_fr_age_fin.Text = "Homme de plus de 45 ans"
Else
Text_fr_age_ini.Text = ""
Text_fr_age_fin.Text = ""
End If


End If


End Sub

'début calcul IMC

Private Sub text_age_change()

If ((Combo_Gender.Text = "Femme") And (Combo_menopause.Text = "Oui")) Or ((Combo_Gender.Text = "Femme") And (Text_age.Text >= "55 ans") And ((Combo_menopause.Text = "Non") Or (Combo_menopause.Text = ""))) Then
Text_fr_age_ini.Text = "Femme de plus de 55 ans ou ménopausée"
Text_fr_age_fin.Text = "Femme de plus de 55 ans ou ménopausée"
Else
If (Combo_Gender.Text = "Homme") And (Text_age.Text >= "45 ans") Then
Text_fr_age_ini.Text = "Homme de plus de 45 ans"
Text_fr_age_fin.Text = "Homme de plus de 45 ans"
Else
Text_fr_age_ini.Text = ""
Text_fr_age_fin.Text = ""
End If


End If

End Sub


Private Sub OnlyNumbers()
'Ensures only numbers are entered in the TextBoxes on the UserForm. This does not affect the TextBoxes on the MultiPage control
   If TypeName(Me.Frame2.ActiveControl) = "TextBox" Then
       With Me.Frame2.ActiveControl
           If Not IsNumeric(.Value) And .Value <> vbNullString Then
               MsgBox "Chiffres et virgule seulement"
               .Value = vbNullString
           End If
       End With
   End If
End Sub
Private Sub OnlyNumbersfin()
'Ensures only numbers are entered in the TextBoxes on the UserForm. This does not affect the TextBoxes on the MultiPage control
   If TypeName(Me.Frame40.ActiveControl) = "TextBox" Then
       With Me.Frame40.ActiveControl
           If Not IsNumeric(.Value) And .Value <> vbNullString Then
               MsgBox "Chiffres et virgule seulement"
               .Value = vbNullString
           End If
       End With
   End If
End Sub

Private Sub OnlyNumbersconvert()
'Ensures only numbers are entered in the TextBoxes on the UserForm. This does not affect the TextBoxes on the MultiPage control
   If TypeName(Me.Frame51.ActiveControl) = "TextBox" Then
       With Me.Frame51.ActiveControl
           If Not IsNumeric(.Value) And .Value <> vbNullString Then
               MsgBox "Chiffres et virgule seulement"
               .Value = vbNullString
           End If
       End With
   End If
End Sub







Private Sub Text_taille_ini_Change()

OnlyNumbers

If (Text_taille_ini.Text) = "" Or (Text_poids_ini.Text) = "" Then
Text_imc_ini.Text = ""
End If

If Text_taille_ini.Value = 0 Then
Text_taille_ini.Value = ""

End If

If Text_taille_ini = "" Or Text_poids_ini = "" Then Exit Sub
Text_imc_ini.Value = ((Text_poids_ini) / (((Text_taille_ini) / 100) ^ 2))
Text_imc_ini.Value = Format(Text_imc_ini.Value, "##.#")
If (Text_taille_ini.Text) = "" And (Text_poids_ini.Text) = "" Then
Text_imc_ini.Text = ""
End If



End Sub

Private Sub Text_poids_ini_Change()
OnlyNumbers

If (Text_taille_ini.Text) = "" Or (Text_poids_ini.Text) = "" Then
Text_imc_ini.Text = ""
End If

If Text_taille_ini = "" Or Text_poids_ini = "" Then Exit Sub
Text_imc_ini.Value = ((Text_poids_ini) / (((Text_taille_ini) / 100) ^ 2))
Text_imc_ini.Value = Format(Text_imc_ini.Value, "##.#")


 
End Sub

Private Sub Text_imc_ini_Change()
If Text_imc_ini.Value = "" Then
Text_fr_obesite_ini.Text = ""
End If

If Len(Text_imc_ini.Text) >= 2 Then
     On Error Resume Next
    Text_fr_obesite_ini.Text = Application.WorksheetFunction. _
        VLookup(CLng(Text_imc_ini.Text), Worksheets("lists.vba").Range("F2:g61"), 2, True)


End If

If Text_imc_ini.Value <= "30" Then
Text_fr_obesite_ini.Text = ""
End If

End Sub

Private Sub Text_taille_fin_Change()
OnlyNumbersfin
If (Text_taille_fin.Text) = "" Or (Text_poids_fin.Text) = "" Then
Text_imc_fin.Text = ""
End If

If Text_taille_fin.Value = 0 Then
Text_taille_fin.Value = ""

End If

If Text_taille_fin = "" Or Text_poids_fin = "" Then Exit Sub
Text_imc_fin.Value = ((Text_poids_fin) / (((Text_taille_fin) / 100) ^ 2))
Text_imc_fin.Value = Format(Text_imc_fin.Value, "##.#")
If (Text_taille_fin.Text) = "" And (Text_poids_fin.Text) = "" Then
Text_imc_fin.Text = ""
End If
End Sub
Private Sub Text_poids_fin_Change()
OnlyNumbersfin
If (Text_taille_fin.Text) = "" Or (Text_poids_fin.Text) = "" Then
Text_imc_fin.Text = ""
End If

If Text_taille_fin = "" Or Text_poids_fin = "" Then Exit Sub
Text_imc_fin.Value = ((Text_poids_fin) / (((Text_taille_fin) / 100) ^ 2))
Text_imc_fin.Value = Format(Text_imc_fin.Value, "##.#")
End Sub

Private Sub Text_imc_fin_Change()
If Text_imc_fin.Value = "" Then
Text_fr_obesite_fin.Text = ""
End If

If Len(Text_imc_fin.Text) >= 2 Then
     On Error Resume Next
    Text_fr_obesite_fin.Text = Application.WorksheetFunction. _
        VLookup(CLng(Text_imc_fin.Text), Worksheets("lists.vba").Range("F2:g61"), 2, True)
End If
If Text_imc_fin.Value <= "30" Then
Text_fr_obesite_fin.Text = ""
End If


End Sub

'fin calcul IMC






'protocole adapté

'protocole adapté
Private Sub Combo_prot_ini_Change()
Dim i As Long
   For i = 1 To 16
      Controls("Text_vit" & i & "_ini").Enabled = Combo_prot_ini.Text = "Protocole adapté"
      Controls("Text_pente" & i & "_ini").Enabled = Combo_prot_ini.Text = "Protocole adapté"
      Controls("Text_vit" & i & "_ini").BackColor = IIf(Combo_prot_ini.Text = "Protocole adapté", "&H80000005", "&H80000004")
      Controls("Text_pente" & i & "_ini").BackColor = IIf(Combo_prot_ini.Text = "Protocole adapté", "&H80000005", "&H80000004")
   Next i
End Sub

Private Sub Combo_prot_fin_Change()
Dim i As Long
   For i = 1 To 16
      Controls("Text_vit" & i & "_fin").Enabled = Combo_prot_fin.Text = "Protocole adapté"
      Controls("Text_pente" & i & "_fin").Enabled = Combo_prot_fin.Text = "Protocole adapté"
      Controls("Text_vit" & i & "_fin").BackColor = IIf(Combo_prot_fin.Text = "Protocole adapté", "&H80000005", "&H80000004")
      Controls("Text_pente" & i & "_fin").BackColor = IIf(Combo_prot_fin.Text = "Protocole adapté", "&H80000005", "&H80000004")
   Next i
End Sub
'fin protocole adapté



'Tapis roulant vs ergomètre


Private Sub Combo_app_fin_Change()
If Combo_app_fin.Text = "Tapis roulant" Then
Text_vit_ergo_max_fin.Enabled = False
Text_vit_ergo_max_fin.BackColor = "&H80000004"
Text_charge_ergo_max_fin.Enabled = False
Text_charge_ergo_max_fin.BackColor = "&H80000004"
Text_vit_tapis_max_fin.Enabled = True
Text_vit_tapis_max_fin.BackColor = "&H80000005"
Text_pente_max_fin.Enabled = True
Text_pente_max_fin.BackColor = "&H80000005"
Label323.Caption = "Pente"
Else
Text_vit_ergo_max_fin.Enabled = True
Text_vit_ergo_max_fin.BackColor = "&H80000005"
Text_charge_ergo_max_fin.Enabled = True
Text_charge_ergo_max_fin.BackColor = "&H80000005"
Text_vit_tapis_max_fin.Enabled = False
Text_vit_tapis_max_fin.BackColor = "&H80000004"
Text_pente_max_fin.Enabled = False
Text_pente_max_fin.BackColor = "&H80000004"
Label323.Caption = "Watt"
End If
If Combo_app_fin.Text = "" Then
Text_vit_ergo_max_fin.Enabled = True
Text_vit_ergo_max_fin.BackColor = "&H80000005"
Text_charge_ergo_max_fin.BackColor = "&H80000005"
Text_vit_tapis_max_fin.Enabled = False
Text_vit_tapis_max_fin.Enabled = True
Text_vit_tapis_max_fin.BackColor = "&H80000005"
Text_pente_max_fin.Enabled = True
Text_pente_max_fin.BackColor = "&H80000005"
Label323.Caption = "Pente / Watt"
End If
End Sub

Private Sub Combo_app_ini_Change()
If Combo_app_ini.Text = "Tapis roulant" Then
Text_vit_ergo_max_ini.Enabled = False
Text_vit_ergo_max_ini.BackColor = "&H80000004"
Text_charge_ergo_max_ini.Enabled = False
Text_charge_ergo_max_ini.BackColor = "&H80000004"
Text_vit_tapis_max_ini.Enabled = True
Text_vit_tapis_max_ini.BackColor = "&H80000005"
Text_pente_max_ini.Enabled = True
Text_pente_max_ini.BackColor = "&H80000005"
Label114.Caption = "Pente"
Else
Text_vit_ergo_max_ini.Enabled = True
Text_vit_ergo_max_ini.BackColor = "&H80000005"
Text_charge_ergo_max_ini.Enabled = True
Text_charge_ergo_max_ini.BackColor = "&H80000005"
Text_vit_tapis_max_ini.Enabled = False
Text_vit_tapis_max_ini.BackColor = "&H80000004"
Text_pente_max_ini.Enabled = False
Text_pente_max_ini.BackColor = "&H80000004"
Label114.Caption = "Watt"
End If
If Combo_app_ini.Text = "" Then
Text_vit_ergo_max_ini.Enabled = True
Text_vit_ergo_max_ini.BackColor = "&H80000005"
Text_charge_ergo_max_ini.BackColor = "&H80000005"
Text_vit_tapis_max_ini.Enabled = False
Text_vit_tapis_max_ini.Enabled = True
Text_vit_tapis_max_ini.BackColor = "&H80000005"
Text_pente_max_ini.Enabled = True
Text_pente_max_ini.BackColor = "&H80000005"
Label114.Caption = "Pente / Watt"
End If

End Sub

'Tapis roulant vs ergomètre fin




'convertir cm en pouces

Private Sub Text_cm_Change()
OnlyNumbersconvert
If Text_cm.Text = "" Then
Text_pouces.Text = ""
Else
Text_pouces.Text = (Text_cm / 2.54)
Text_pouces.Value = Format(Text_pouces.Value, "##.#")
End If
End Sub



















Private Sub CommandButton1_Click()
'when we click the 'continue' button

Dim TargetRow As Integer 'variable for position control
Dim FullName As String 'full name
Dim UserMessage As String 'variable to configure user message at the end


Dim i As Long



FullName = Txt_Surname & " " & Txt_First 'concatenate first and surname for use in code below

'begin check if in 'edit' or 'add new' mode
If Sheets("Engine").Range("B4").Value = "NEW" Then 'in 'new' mode

    'begin validation check 'check if name already exists
    If Application.WorksheetFunction.CountIf(Sheets("Data").Range("E8:E10008"), FullName) > 0 Then
    
    MsgBox "Name already exists", 0, "Check"
    Exit Sub 'notify user and exit the routine
    
    End If
    'end validation check
    
TargetRow = Sheets("Engine").Range("B3").Value + 1 'make variable equal to COUNTA formula on worksheet + 1
UserMessage = " a été ajouté à la base de données" 'configure user message for add new entry

Else 'in 'edit' mode
 
TargetRow = Sheets("Engine").Range("B5").Value 'make variable equal to the value saved in the engine
UserMessage = " a été modifié" 'configure user message for edit entry

End If
'end check if in 'edit' or 'add new mode'

'''BEGIN INPUT DATA INTO DATABASE'''
Sheets("Data").Range("Data_Start").Offset(TargetRow, 0).Value = TargetRow 'ref
Sheets("Data").Range("Data_Start").Offset(TargetRow, 1).Value = Txt_First 'first name
Sheets("Data").Range("Data_Start").Offset(TargetRow, 2).Value = (Text_Dossier) '# dossier
Sheets("Data").Range("Data_Start").Offset(TargetRow, 3).Value = UCase(Txt_Surname) & " " & Txt_First 'full name 'concatenate
Sheets("Data").Range("Data_Start").Offset(TargetRow, 4).Value = Txt_Surname 'surname
Sheets("Data").Range("Data_Start").Offset(TargetRow, 5).Value = (Text_ddn) 'DDN
Sheets("Data").Range("Data_Start").Offset(TargetRow, 6).Value = Combo_Gender 'Sexe
Sheets("Data").Range("Data_Start").Offset(TargetRow, 7).Value = Combo_dominance 'Dominance
Sheets("Data").Range("Data_Start").Offset(TargetRow, 8).Value = Text_Kin 'kinésiologue
Sheets("Data").Range("Data_Start").Offset(TargetRow, 9).Value = Combo_Programme ' Programme
Sheets("Data").Range("Data_Start").Offset(TargetRow, 10).Value = Text_date_eval_ini 'Date éval initiale
Sheets("Data").Range("Data_Start").Offset(TargetRow, 11).Value = Combo_menopause 'Ménopause
Sheets("Data").Range("Data_Start").Offset(TargetRow, 12).Value = (Text_taille_ini) 'Taille
Sheets("Data").Range("Data_Start").Offset(TargetRow, 13).Value = (Text_poids_ini) 'Poids
Sheets("Data").Range("Data_Start").Offset(TargetRow, 14).Value = (Text_ct_ini) 'Tour de taille
Sheets("Data").Range("Data_Start").Offset(TargetRow, 15).Value = Text_com_pds_ini 'commentaires poids
Sheets("Data").Range("Data_Start").Offset(TargetRow, 16).Value = (Text_tas_ini) 'tension systolique repos
Sheets("Data").Range("Data_Start").Offset(TargetRow, 17).Value = (Text_tad_ini) 'tension diastolique repos
Sheets("Data").Range("Data_Start").Offset(TargetRow, 18).Value = (Text_fc_ini) 'fc couché
Sheets("Data").Range("Data_Start").Offset(TargetRow, 19).Value = (Text_gly_ini) 'glycémie
Sheets("Data").Range("Data_Start").Offset(TargetRow, 20).Value = (Text_mg_ini) 'masse grasse
Sheets("Data").Range("Data_Start").Offset(TargetRow, 21).Value = (Text_mm_ini) 'masse maigre
Sheets("Data").Range("Data_Start").Offset(TargetRow, 22).Value = (Text_mh_ini) 'masse hydrique
Sheets("Data").Range("Data_Start").Offset(TargetRow, 23).Value = (Text_pg_ini) '% de gras
Sheets("Data").Range("Data_Start").Offset(TargetRow, 24).Value = Text_dx 'diagnostic



    For i = 1 To 8
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 24 + i).Value = Controls("Txt_condasso" & i) 'conditions associées
      Next i
      
     
    For i = 1 To 24
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 32 + i).Value = Controls("Text_rx" & i) 'Rx
      Next i




Sheets("Data").Range("Data_Start").Offset(TargetRow, 57).Value = Text_fr_age_ini ' facteur risque
Sheets("Data").Range("Data_Start").Offset(TargetRow, 58).Value = Text_fr_obesite_ini ' facteur risque


    For i = 1 To 7
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 58 + i).Value = Controls("Combo_fr" & i & "_ini") ' facteur risque
      Next i





Sheets("Data").Range("Data_Start").Offset(TargetRow, 66).Value = Combo_malconnu1_ini ' facteur risque
Sheets("Data").Range("Data_Start").Offset(TargetRow, 67).Value = Combo_malconnu2_ini ' facteur risque
Sheets("Data").Range("Data_Start").Offset(TargetRow, 68).Value = Text_passe_sportif 'titre passé sportif


  For i = 1 To 9
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 68 + i).Value = Controls("Text_ps" & i) ' passé sportif ini
      Next i

Sheets("Data").Range("Data_Start").Offset(TargetRow, 78).Value = Text_passe_actif 'Titre passé actif

 For i = 1 To 9
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 78 + i).Value = Controls("Text_pa" & i) ' passé actif ini
      Next i



Sheets("Data").Range("Data_Start").Offset(TargetRow, 88).Value = Text_apactuelle 'Titre act actuelle

 For i = 1 To 9
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 88 + i).Value = Controls("Text_ap" & i) 'ap actuelle
      Next i



Sheets("Data").Range("Data_Start").Offset(TargetRow, 98).Value = Text_materiel 'matériel disponible
Sheets("Data").Range("Data_Start").Offset(TargetRow, 99).Value = Text_AP_commentaires 'commentaires AP
Sheets("Data").Range("Data_Start").Offset(TargetRow, 100).Value = (Text_nbrepas) 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 101).Value = (Text_nbcoll) 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 102).Value = Text_hydra 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 103).Value = Text_alcool 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 104).Value = Text_cafe 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 105).Value = Text_boisson_sucrees 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 106).Value = Text_dej 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 107).Value = TextBox_diner 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 108).Value = Text_souper 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 109).Value = Text_alim_comment 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 110).Value = Text_alim_remplacement 'Alim
Sheets("Data").Range("Data_Start").Offset(TargetRow, 111).Value = Text_tabac 'Alim


For i = 1 To 5
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 111 + i).Value = Controls("Text_attente" & i) 'attente usager
      Next i

For i = 1 To 4
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 116 + i).Value = Controls("Text_obj_kin" & i) 'obj kin
      Next i


Sheets("Data").Range("Data_Start").Offset(TargetRow, 121).Value = Text_conclu_ini 'conclusion rapport initial


'leapa initial
Sheets("Data").Range("Data_Start").Offset(TargetRow, 122).Value = Text_date_leapa_ini 'Date test initial
Sheets("Data").Range("Data_Start").Offset(TargetRow, 123).Value = Combo_rapport_leapa_ini 'Tableau LEAPA présent dans le rapport
Sheets("Data").Range("Data_Start").Offset(TargetRow, 124).Value = Combo_app_ini 'appareil
Sheets("Data").Range("Data_Start").Offset(TargetRow, 125).Value = Combo_prot_ini 'protocole
Sheets("Data").Range("Data_Start").Offset(TargetRow, 126).Value = Text_EPE_fin_ini 'EPE fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 127).Value = (Text_fc_repos_ini) 'fc max
Sheets("Data").Range("Data_Start").Offset(TargetRow, 128).Value = (Text_TA_repos_ini) 'TA max
Sheets("Data").Range("Data_Start").Offset(TargetRow, 129).Value = (Text_vit_tapis_max_ini) 'vitesse tapis max
Sheets("Data").Range("Data_Start").Offset(TargetRow, 130).Value = (Text_vit_ergo_max_ini) 'vitesse ergomètre max
Sheets("Data").Range("Data_Start").Offset(TargetRow, 131).Value = (Text_pente_max_ini) ' pente fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 132).Value = (Text_charge_ergo_max_ini) 'charge ergo fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 133).Value = (Text_duree_test_ini) 'durée test
Sheets("Data").Range("Data_Start").Offset(TargetRow, 134).Value = (Text_dlr_pre_ini) 'dlr pré
Sheets("Data").Range("Data_Start").Offset(TargetRow, 135).Value = (Text_dlr_post_ini) 'dlr post
Sheets("Data").Range("Data_Start").Offset(TargetRow, 136).Value = Text_raison_arret_ini 'raison d'arrêt test

Sheets("Data").Range("Data_Start").Offset(TargetRow, 137).Value = (Text_FCRmin_ini) 'fc réserve % min
Sheets("Data").Range("Data_Start").Offset(TargetRow, 138).Value = (Text_FCRmax_ini) 'fc réserve % max


Sheets("Data").Range("Data_Start").Offset(TargetRow, 139).Value = Combo_cardio_ini 'cardiologue
Sheets("Data").Range("Data_Start").Offset(TargetRow, 140).Value = Combo_inf_ini 'infirmière
Sheets("Data").Range("Data_Start").Offset(TargetRow, 141).Value = Text_com_cardio_ini 'commentaire cardiologue
Sheets("Data").Range("Data_Start").Offset(TargetRow, 142).Value = Text_evol_fc_ini 'évolution fc
Sheets("Data").Range("Data_Start").Offset(TargetRow, 143).Value = Text_recup_ini 'récupération
Sheets("Data").Range("Data_Start").Offset(TargetRow, 144).Value = Text_dlr_text_ini 'text dlr remplacement
Sheets("Data").Range("Data_Start").Offset(TargetRow, 145).Value = Text_obs_effort_ini 'observation
Sheets("Data").Range("Data_Start").Offset(TargetRow, 146).Value = Text_leapa_text_perso_ini 'texte de remplacement
Sheets("Data").Range("Data_Start").Offset(TargetRow, 147).Value = Text_descri_ini 'description protocole adapté


    For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 147 + i).Value = Controls("Text_fc_" & i & "_ini") ' fc ini
      Next i




'Sheets("Data").Range("Data_Start").Offset(TargetRow, 164).Value = Text_fc_17_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 165).Value = Text_fc_18_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 166).Value = Text_fc_19_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 167).Value = Text_fc_20_ini

For i = 1 To 8
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 167 + i).Value = Controls("Text_TAS" & i & "_ini") ' TAS ini
      Next i



'Sheets("Data").Range("Data_Start").Offset(TargetRow, 176).Value = Text_TAS9_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 177).Value = Text_TAS10_ini

For i = 1 To 8
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 177 + i).Value = Controls("Text_TAD" & i & "_ini") ' TAD ini
      Next i



'Sheets("Data").Range("Data_Start").Offset(TargetRow, 186).Value = Text_TAD9_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 187).Value = Text_TAD10_ini

For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 187 + i).Value = Controls("Text_epe" & i & "_ini") ' epe ini
      Next i


'Sheets("Data").Range("Data_Start").Offset(TargetRow, 204).Value = Text_epe17_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 205).Value = Text_epe18_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 206).Value = Text_epe19_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 207).Value = Text_epe20_ini

For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 207 + i).Value = Controls("Text_dlr" & i & "_ini") ' dlr ini
      Next i



'Sheets("Data").Range("Data_Start").Offset(TargetRow, 224).Value = Text_dlr17_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 225).Value = Text_dlr18_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 226).Value = Text_dlr19_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 227).Value = Text_dlr20_ini

For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 227 + i).Value = Controls("Text_vit" & i & "_ini") ' vitesse ini
      Next i



'Sheets("Data").Range("Data_Start").Offset(TargetRow, 244).Value = Text_vit17_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 245).Value = Text_vit18_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 246).Value = Text_vit19_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 247).Value = Text_vit20_ini


For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 247 + i).Value = Controls("Text_pente" & i & "_ini") ' pente ini
      Next i


'Sheets("Data").Range("Data_Start").Offset(TargetRow, 264).Value = Text_pente17_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 265).Value = Text_pente18_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 266).Value = Text_pente19_ini
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 267).Value = Text_pente20_ini
Sheets("Data").Range("Data_Start").Offset(TargetRow, 268).Value = Combo_dom_preh_ini 'dominance force préhension
Sheets("Data").Range("Data_Start").Offset(TargetRow, 269).Value = (Text_MSD_1_ini) 'préhension
Sheets("Data").Range("Data_Start").Offset(TargetRow, 270).Value = (Text_MSD_2_ini) 'préhension
Sheets("Data").Range("Data_Start").Offset(TargetRow, 271).Value = (Text_MSD_3_ini) 'préhension
Sheets("Data").Range("Data_Start").Offset(TargetRow, 272).Value = (Text_MSG_1_ini) 'préhension
Sheets("Data").Range("Data_Start").Offset(TargetRow, 273).Value = (Text_MSG_2_ini) 'préhension
Sheets("Data").Range("Data_Start").Offset(TargetRow, 274).Value = (Text_MSG_3_ini) 'préhension
Sheets("Data").Range("Data_Start").Offset(TargetRow, 275).Value = Text_preh_obs_ini 'préhension
Sheets("Data").Range("Data_Start").Offset(TargetRow, 276).Value = (Text_résult_6_ini) '6 min de marche
Sheets("Data").Range("Data_Start").Offset(TargetRow, 277).Value = (Text_dlr_6_pre_ini) '6 min de marche dlr pré
Sheets("Data").Range("Data_Start").Offset(TargetRow, 278).Value = (Text_dlr_6_post_ini) '6 min de marche dlr post
Sheets("Data").Range("Data_Start").Offset(TargetRow, 279).Value = Text_obs_6_ini '6 min de marche observations



Sheets("Data").Range("Data_Start").Offset(TargetRow, 280).Value = (Text_date_pod_1_ini)                                           'podométrie date
Sheets("Data").Range("Data_Start").Offset(TargetRow, 281).Value = (Text_date_pod_2_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 282).Value = (Text_date_pod_3_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 283).Value = (Text_date_pod_4_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 284).Value = (Text_date_pod_5_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 285).Value = (Text_date_pod_6_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 286).Value = (Text_date_pod_7_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 287).Value = (Text_date_pod_8_ini)

       
Sheets("Data").Range("Data_Start").Offset(TargetRow, 289).Value = (Text_result_podo2_ini)                                                       'podométrie résultat
Sheets("Data").Range("Data_Start").Offset(TargetRow, 290).Value = (Text_result_podo3_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 291).Value = (Text_result_podo4_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 292).Value = (Text_result_podo5_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 293).Value = (Text_result_podo6_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 294).Value = (Text_result_podo7_ini)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 295).Value = (Text_result_podo8_ini)










Sheets("Data").Range("Data_Start").Offset(TargetRow, 296).Value = Combo_poignet_ini 'podométrie montre g ou d
Sheets("Data").Range("Data_Start").Offset(TargetRow, 297).Value = Text_com_podo_ini 'podométrie commentaires
Sheets("Data").Range("Data_Start").Offset(TargetRow, 298).Value = Combo_CAP_ini 'circuit d'activités physique choix
Sheets("Data").Range("Data_Start").Offset(TargetRow, 299).Value = (Text_marche_ini) 'test vitesse de marche
Sheets("Data").Range("Data_Start").Offset(TargetRow, 300).Value = Text_obs_marche_ini 'test vitesse de marche
Sheets("Data").Range("Data_Start").Offset(TargetRow, 301).Value = (Text_planche_ini) 'planche abdo
Sheets("Data").Range("Data_Start").Offset(TargetRow, 302).Value = Text_planche_obs_ini 'planche abdo
Sheets("Data").Range("Data_Start").Offset(TargetRow, 303).Value = (Text_corde_ini) 'corde à sauter
Sheets("Data").Range("Data_Start").Offset(TargetRow, 304).Value = Text_corde_obs_ini 'corde à sauter
Sheets("Data").Range("Data_Start").Offset(TargetRow, 305).Value = (Text_saut_1_ini) 'sauts verticaux
Sheets("Data").Range("Data_Start").Offset(TargetRow, 306).Value = (Text_saut_2_ini) 'sauts verticaux
Sheets("Data").Range("Data_Start").Offset(TargetRow, 307).Value = Text_saut_obs_ini 'sauts verticaux
Sheets("Data").Range("Data_Start").Offset(TargetRow, 308).Value = (Text_push_ini) 'pushup
Sheets("Data").Range("Data_Start").Offset(TargetRow, 309).Value = Text_push_obs_ini 'pushup
Sheets("Data").Range("Data_Start").Offset(TargetRow, 310).Value = Text_chaise_ini 'chaise au mur
Sheets("Data").Range("Data_Start").Offset(TargetRow, 311).Value = (Text_chaise_obs_ini) 'chaise au mur
Sheets("Data").Range("Data_Start").Offset(TargetRow, 312).Value = (Text_equi_d1_ini) 'équilibre unipodal
Sheets("Data").Range("Data_Start").Offset(TargetRow, 313).Value = (Text_equi_d2_ini) 'équilibre unipodal
Sheets("Data").Range("Data_Start").Offset(TargetRow, 314).Value = (Text_equi_d3_ini) 'équilibre unipodal
Sheets("Data").Range("Data_Start").Offset(TargetRow, 315).Value = Combo_45sd_ini 'équilibre unipodal
Sheets("Data").Range("Data_Start").Offset(TargetRow, 316).Value = (Text_equi_g1_ini) 'équilibre unipodal
Sheets("Data").Range("Data_Start").Offset(TargetRow, 317).Value = (Text_equi_g2_ini) 'équilibre unipodal
Sheets("Data").Range("Data_Start").Offset(TargetRow, 318).Value = (Text_equi_g3_ini) 'équilibre unipodal
Sheets("Data").Range("Data_Start").Offset(TargetRow, 319).Value = Combo_45sg_ini 'équilibre unipodal
Sheets("Data").Range("Data_Start").Offset(TargetRow, 320).Value = Text_equi_obs_ini 'équilibre unipodal
Sheets("Data").Range("Data_Start").Offset(TargetRow, 321).Value = (Text_stress_pré_ini) 'stress avant
Sheets("Data").Range("Data_Start").Offset(TargetRow, 322).Value = (Text_stress_act_ini) 'stess actuellement
Sheets("Data").Range("Data_Start").Offset(TargetRow, 323).Value = (Text_energie_pre_ini) 'énergie avant
Sheets("Data").Range("Data_Start").Offset(TargetRow, 324).Value = (Text_energie_act_ini) 'énergie actuellement
Sheets("Data").Range("Data_Start").Offset(TargetRow, 325).Value = (Text_kinap_capacites_ini) 'Kinap capacités
Sheets("Data").Range("Data_Start").Offset(TargetRow, 326).Value = (Text_kinap_craintes_ini) 'Kinap craintes
Sheets("Data").Range("Data_Start").Offset(TargetRow, 327).Value = (Text_kinap_tsk_ini) 'TSK
Sheets("Data").Range("Data_Start").Offset(TargetRow, 328).Value = Text_tsk_appr_ini 'TSK appréciation
Sheets("Data").Range("Data_Start").Offset(TargetRow, 329).Value = (Text_assisdebout_ini) 'résultat assis debout
Sheets("Data").Range("Data_Start").Offset(TargetRow, 330).Value = Text_assisdebout_com_ini 'commentaires assis-debout
Sheets("Data").Range("Data_Start").Offset(TargetRow, 331).Value = Text_sign_ini 'date signature rapport pré






Sheets("Data").Range("Data_Start").Offset(TargetRow, 332).Value = Text_date_eval_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 333).Value = Text_taille_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 334).Value = Text_poids_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 335).Value = Text_ct_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 336).Value = Text_com_pds_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 337).Value = Text_tas_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 338).Value = Text_tad_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 339).Value = Text_fc_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 340).Value = Text_gly_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 341).Value = Text_mg_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 342).Value = Text_mm_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 343).Value = Text_mh_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 344).Value = Text_pg_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 345).Value = Text_fr_age_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 346).Value = Text_fr_obesite_fin

For i = 1 To 7
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 346 + i).Value = Controls("Combo_fr" & i & "_fin") ' facteurs de risque fin
      Next i





Sheets("Data").Range("Data_Start").Offset(TargetRow, 354).Value = Combo_malconnu1_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 355).Value = Combo_malconnu2_fin

Sheets("Data").Range("Data_Start").Offset(TargetRow, 356).Value = Text_passe_sportif_fin

For i = 1 To 9
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 356 + i).Value = Controls("Text_ps" & i & "_fin") ' passé sportif fin
      Next i



Sheets("Data").Range("Data_Start").Offset(TargetRow, 366).Value = Text_passe_actif_fin


For i = 1 To 9
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 366 + i).Value = Controls("Text_pa" & i & "_fin") ' passé actif fin
      Next i
      
     
      


Sheets("Data").Range("Data_Start").Offset(TargetRow, 376).Value = Text_apactuelle_fni

For i = 1 To 9
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 376 + i).Value = Controls("Text_ap" & i & "_fin") ' ap actuelle
      Next i



Sheets("Data").Range("Data_Start").Offset(TargetRow, 386).Value = Text_materiel_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 387).Value = Text_AP_commentaires_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 388).Value = Text_nbrepas_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 389).Value = Text_nbcoll_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 390).Value = Text_hydra_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 391).Value = Text_alcool_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 392).Value = Text_cafe_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 393).Value = Text_boisson_sucrees_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 394).Value = Text_dej_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 395).Value = TextBox_diner_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 396).Value = Text_souper_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 397).Value = Text_alim_comment_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 398).Value = Text_alim_remplacement_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 399).Value = Text_tabac_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 400).Value = Text_stress_pré_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 401).Value = Text_stress_act_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 402).Value = Text_energie_pre_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 403).Value = Text_energie_act_fin

Sheets("Data").Range("Data_Start").Offset(TargetRow, 404).Value = Text_date_leapa_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 405).Value = Combo_cardio_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 406).Value = Combo_inf_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 407).Value = Combo_app_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 408).Value = Combo_prot_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 409).Value = (Text_duree_test_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 410).Value = Text_descri_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 411).Value = (Text_fc_repos_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 412).Value = Text_TA_repos_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 413).Value = Text_EPE_fin_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 414).Value = (Text_vit_tapis_max_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 415).Value = Text_pente_max_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 416).Value = (Text_vit_ergo_max_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 417).Value = (Text_charge_ergo_max_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 418).Value = (Text_dlr_pre_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 419).Value = Text_dlr_post_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 420).Value = (Text_FCRmin_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 421).Value = (Text_FCRmax_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 422).Value = Combo_rapport_leapa_fin


For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 422 + i).Value = Controls("Text_fc_" & i & "_fin") ' fc fin
      Next i



'Sheets("Data").Range("Data_Start").Offset(TargetRow, 439).Value = Text_fc_17_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 440).Value = Text_fc_18_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 441).Value = Text_fc_19_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 442).Value = Text_fc_20_fin


For i = 1 To 8
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 442 + i).Value = Controls("Text_TAS" & i & "_fin") ' TAS fin
      Next i


'Sheets("Data").Range("Data_Start").Offset(TargetRow, 451).Value = Text_TAS9_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 452).Value = Text_TAS10_fin


For i = 1 To 8
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 452 + i).Value = Controls("Text_TAD" & i & "_fin") ' TAD fin
      Next i


'Sheets("Data").Range("Data_Start").Offset(TargetRow, 461).Value = Text_TAD9_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 462).Value = Text_TAD10_fin

For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 462 + i).Value = Controls("Text_epe" & i & "_fin") ' epe fin
      Next i




'Sheets("Data").Range("Data_Start").Offset(TargetRow, 479).Value = Text_epe17_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 480).Value = Text_epe18_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 481).Value = Text_epe19_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 482).Value = Text_epe20_fin


For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 482 + i).Value = Controls("Text_dlr" & i & "_fin") ' dlr fin
      Next i




'Sheets("Data").Range("Data_Start").Offset(TargetRow, 499).Value = Text_dlr17_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 500).Value = Text_dlr18_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 501).Value = Text_dlr19_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 502).Value = Text_dlr20_fin

For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 502 + i).Value = Controls("Text_vit" & i & "_fin") ' vitesse fin
      Next i



'Sheets("Data").Range("Data_Start").Offset(TargetRow, 519).Value = Text_vit17_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 520).Value = Text_vit18_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 521).Value = Text_vit19_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 522).Value = Text_vit20_fin


For i = 1 To 16
      Sheets("Data").Range("Data_Start").Offset(TargetRow, 522 + i).Value = Controls("Text_pente" & i & "_fin") ' charge fin
      Next i




'Sheets("Data").Range("Data_Start").Offset(TargetRow, 539).Value = Text_pente17_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 540).Value = Text_pente18_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 541).Value = Text_pente19_fin
'Sheets("Data").Range("Data_Start").Offset(TargetRow, 542).Value = Text_pente20_fin


Sheets("Data").Range("Data_Start").Offset(TargetRow, 543).Value = Text_raison_arret_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 544).Value = Text_com_cardio_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 545).Value = Text_evol_fc_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 546).Value = Text_recup_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 547).Value = Text_dlr_text_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 548).Value = Text_obs_effort_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 549).Value = Text_leapa_text_perso_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 550).Value = Combo_CAP_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 551).Value = (Text_marche_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 552).Value = Text_obs_marche_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 553).Value = (Text_planche_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 554).Value = Text_planche_obs_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 555).Value = (Text_corde_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 556).Value = Text_corde_obs_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 557).Value = (Text_saut_1_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 558).Value = (Text_saut_2_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 559).Value = Text_saut_obs_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 560).Value = (Text_push_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 561).Value = Text_push_obs_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 562).Value = (Text_chaise_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 563).Value = Text_chaise_obs_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 564).Value = (Text_kinap_capacites_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 565).Value = (Text_kinap_craintes_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 566).Value = (Text_kinap_tsk_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 567).Value = Text_tsk_appr_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 568).Value = Combo_poignet_fin





Sheets("Data").Range("Data_Start").Offset(TargetRow, 569).Value = (Text_date_pod_1_fin)                  'podométrie date
Sheets("Data").Range("Data_Start").Offset(TargetRow, 570).Value = (Text_date_pod_2_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 571).Value = (Text_date_pod_3_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 572).Value = (Text_date_pod_4_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 573).Value = (Text_date_pod_5_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 574).Value = (Text_date_pod_6_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 575).Value = (Text_date_pod_7_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 576).Value = (Text_date_pod_8_fin)


Sheets("Data").Range("Data_Start").Offset(TargetRow, 577).Value = (Text_result_podo1_fin)                    'podémotrie résultats
Sheets("Data").Range("Data_Start").Offset(TargetRow, 578).Value = (Text_result_podo2_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 579).Value = (Text_result_podo3_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 580).Value = (Text_result_podo4_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 581).Value = (Text_result_podo5_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 582).Value = (Text_result_podo6_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 583).Value = (Text_result_podo7_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 584).Value = (Text_result_podo8_fin)









Sheets("Data").Range("Data_Start").Offset(TargetRow, 585).Value = Text_com_podo_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 586).Value = Combo_dom_preh_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 587).Value = (Text_MSG_1_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 588).Value = (Text_MSG_2_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 589).Value = (Text_MSG_3_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 590).Value = (Text_MSD_1_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 591).Value = (Text_MSD_2_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 592).Value = (Text_MSD_3_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 593).Value = Text_preh_obs_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 594).Value = (Text_equi_g1_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 595).Value = (Text_equi_g2_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 596).Value = (Text_equi_g3_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 597).Value = Combo_45sg_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 598).Value = (Text_equi_d1_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 599).Value = (Text_equi_d2_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 600).Value = (Text_equi_d3_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 601).Value = Combo_45sd_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 602).Value = Text_equi_obs_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 603).Value = Text_dlr_6_pre_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 604).Value = Text_dlr_6_post_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 605).Value = Text_résult_6_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 606).Value = Text_obs_6_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 607).Value = (Text_assisdebout_fin)
Sheets("Data").Range("Data_Start").Offset(TargetRow, 608).Value = Text_assisdebout_com_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 609).Value = Text_conclu_fin
Sheets("Data").Range("Data_Start").Offset(TargetRow, 610).Value = (Text_sign_fin)



'''END INPUT DATA INTO DATABASE'''

Unload Data_UF 'close the userform

MsgBox FullName & UserMessage, 0, "Completé" 'display message box (configured according to mode)

End Sub

Private Sub CommandButton2_Click()

Unload Data_UF

End Sub

and the code to edit new file

VBA Code:
Option Explicit



Private Sub ColumnE_Menu_Change()

End Sub

Private Sub CommandButton1_Click()

Dim TargetRow As Integer 'variable to save position of this person in database
Dim i As Long

'use Match worksheet function to find position of chosen name
TargetRow = Application.WorksheetFunction.Match(ColumnE_Menu, Sheets("Data").Range("Dyn_Full_Name"), 0)
Sheets("Engine").Range("B5").Value = TargetRow 'save position in the engine, for use later

Unload Find_Entry_UF 'unload the userform to select a name
    
Dim W
Set W = Data_UF
    
'''Begin retrieving data from database'''
With Sheets("Data").Range("Data_Start")
   W.Txt_First = .Offset(TargetRow, 1).Value 'first name
     W.Text_Dossier = .Offset(TargetRow, 2).Value '# dossier
   W.Txt_Surname = .Offset(TargetRow, 4).Value 'surname
   
 
   W.Text_ddn = .Offset(TargetRow, 5).Value 'DDN
   W.Combo_Gender = .Offset(TargetRow, 6).Value 'Sexe
   W.Combo_dominance = .Offset(TargetRow, 7).Value 'Dominance
   W.Text_Kin = .Offset(TargetRow, 8).Value 'Kinésiologue
   W.Combo_Programme = .Offset(TargetRow, 9).Value 'Programme
   W.Text_date_eval_ini = .Offset(TargetRow, 10).Value 'Date éval initiale
   W.Combo_menopause = .Offset(TargetRow, 11).Value 'Ménopause
   W.Text_taille_ini = .Offset(TargetRow, 12).Value
   W.Text_poids_ini = .Offset(TargetRow, 13).Value
   W.Text_ct_ini = .Offset(TargetRow, 14).Value
   W.Text_com_pds_ini = .Offset(TargetRow, 15).Value
   W.Text_tas_ini = .Offset(TargetRow, 16).Value
   W.Text_tad_ini = .Offset(TargetRow, 17).Value
   W.Text_fc_ini = .Offset(TargetRow, 18).Value
   W.Text_gly_ini = .Offset(TargetRow, 19).Value
   W.Text_mg_ini = .Offset(TargetRow, 20).Value
   W.Text_mm_ini = .Offset(TargetRow, 21).Value
   W.Text_mh_ini = .Offset(TargetRow, 22).Value
   W.Text_pg_ini = .Offset(TargetRow, 23).Value
   W.Text_dx = .Offset(TargetRow, 24).Value
       
       For i = 1 To 8
      W.Controls("Txt_condasso" & i) = .Offset(TargetRow, 24 + i) 'condition(s) associée(s)
   Next i
   For i = 1 To 24
      W.Controls("Text_rx" & i) = .Offset(TargetRow, 32 + i) 'médication
   Next i
   
   W.Text_fr_age_ini = .Offset(TargetRow, 57).Value
   W.Text_fr_obesite_ini = .Offset(TargetRow, 58).Value
   
      For i = 1 To 7
      W.Controls("Combo_fr" & i & "_ini") = .Offset(TargetRow, 58 + i) 'facteurs de risque
      Next i
      
       
   W.Combo_malconnu1_ini = .Offset(TargetRow, 66).Value
   W.Combo_malconnu2_ini = .Offset(TargetRow, 67).Value
   W.Text_passe_sportif = .Offset(TargetRow, 68).Value
   
   For i = 1 To 9
   W.Controls("Text_ps" & i) = .Offset(TargetRow, 68 + i)  'passé sportif
   Next i
   
     
   W.Text_passe_actif = .Offset(TargetRow, 78).Value
   
   For i = 1 To 9
   W.Controls("Text_pa" & i) = .Offset(TargetRow, 78 + i)  'passé actif
   Next i
   
    
   W.Text_apactuelle = .Offset(TargetRow, 88).Value
   
   For i = 1 To 9
   W.Controls("Text_ap" & i) = .Offset(TargetRow, 88 + i)  'activité physique actuelle
   Next i
     
    W.Text_materiel = .Offset(TargetRow, 98).Value
   W.Text_AP_commentaires = .Offset(TargetRow, 99).Value
   W.Text_nbrepas = .Offset(TargetRow, 100).Value
   W.Text_nbcoll = .Offset(TargetRow, 101).Value
   W.Text_hydra = .Offset(TargetRow, 102).Value
   W.Text_alcool = .Offset(TargetRow, 103).Value
   W.Text_cafe = .Offset(TargetRow, 104).Value
   W.Text_boisson_sucrees = .Offset(TargetRow, 105).Value
   W.Text_dej = .Offset(TargetRow, 106).Value
   W.TextBox_diner = .Offset(TargetRow, 107).Value
   W.Text_souper = .Offset(TargetRow, 108).Value
   W.Text_alim_comment = .Offset(TargetRow, 109).Value
   W.Text_alim_remplacement = .Offset(TargetRow, 110).Value
   W.Text_tabac = .Offset(TargetRow, 111).Value
   
   
   For i = 1 To 5
   W.Controls("Text_attente" & i) = .Offset(TargetRow, 111 + i)  'attentes client
   Next i
   
   For i = 1 To 4
   W.Controls("Text_obj_kin" & i) = .Offset(TargetRow, 116 + i)  'Objectifs en kin
   Next i
   
   
  
   W.Text_conclu_ini = .Offset(TargetRow, 121).Value
   W.Text_date_leapa_ini = .Offset(TargetRow, 122).Value
   W.Combo_rapport_leapa_ini = .Offset(TargetRow, 123).Value
   W.Combo_app_ini = .Offset(TargetRow, 124).Value
   W.Combo_prot_ini = .Offset(TargetRow, 125).Value
   W.Text_EPE_fin_ini = .Offset(TargetRow, 126).Value
   W.Text_fc_repos_ini = .Offset(TargetRow, 127).Value
   W.Text_TA_repos_ini = .Offset(TargetRow, 128).Value
   W.Text_vit_tapis_max_ini = .Offset(TargetRow, 129).Value
   W.Text_vit_ergo_max_ini = .Offset(TargetRow, 130).Value
   W.Text_pente_max_ini = .Offset(TargetRow, 131).Value
   W.Text_charge_ergo_max_ini = .Offset(TargetRow, 132).Value
   W.Text_duree_test_ini = .Offset(TargetRow, 133).Value
   W.Text_dlr_pre_ini = .Offset(TargetRow, 134).Value
   W.Text_dlr_post_ini = .Offset(TargetRow, 135).Value
   W.Text_raison_arret_ini = .Offset(TargetRow, 136).Value
   W.Text_FCRmin_ini = .Offset(TargetRow, 137).Value
   W.Text_FCRmax_ini = .Offset(TargetRow, 138).Value
   W.Combo_cardio_ini = .Offset(TargetRow, 139).Value
   W.Combo_inf_ini = .Offset(TargetRow, 140).Value
   W.Text_com_cardio_ini = .Offset(TargetRow, 141).Value
   W.Text_evol_fc_ini = .Offset(TargetRow, 142).Value
   W.Text_recup_ini = .Offset(TargetRow, 143).Value
   W.Text_dlr_text_ini = .Offset(TargetRow, 144).Value
   W.Text_obs_effort_ini = .Offset(TargetRow, 145).Value
   W.Text_leapa_text_perso_ini = .Offset(TargetRow, 146).Value
   W.Text_descri_ini = .Offset(TargetRow, 147).Value
   
   
   For i = 1 To 16
      W.Controls("Text_fc_" & i & "_ini") = .Offset(TargetRow, 147 + i) 'fc ini
      Next i
   
   'ajouter texte pour fc 17 à 20
  
   For i = 1 To 8
      W.Controls("Text_TAS" & i & "_ini") = .Offset(TargetRow, 167 + i) 'TAS_ini
      Next i
  
  
  For i = 1 To 8
      W.Controls("Text_TAD" & i & "_ini") = .Offset(TargetRow, 177 + i) 'TAD_ini
      Next i
   
    For i = 1 To 16
      W.Controls("Text_epe" & i & "_ini") = .Offset(TargetRow, 187 + i) 'EPE_ini
      Next i
   

   For i = 1 To 16
      W.Controls("Text_dlr" & i & "_ini") = .Offset(TargetRow, 207 + i) 'dlr_ini
      Next i
   
   For i = 1 To 16
      W.Controls("Text_vit" & i & "_ini") = .Offset(TargetRow, 227 + i) 'vit_ini
      Next i
   
   For i = 1 To 16
      W.Controls("Text_pente" & i & "_ini") = .Offset(TargetRow, 247 + i) 'pente_ini
      Next i
    


      
   W.Combo_dom_preh_ini = .Offset(TargetRow, 268).Value
   W.Text_MSD_1_ini = .Offset(TargetRow, 269).Value
   W.Text_MSD_2_ini = .Offset(TargetRow, 270).Value
   W.Text_MSD_3_ini = .Offset(TargetRow, 271).Value
   W.Text_MSG_1_ini = .Offset(TargetRow, 272).Value
   W.Text_MSG_2_ini = .Offset(TargetRow, 273).Value
   W.Text_MSG_3_ini = .Offset(TargetRow, 274).Value
   W.Text_preh_obs_ini = .Offset(TargetRow, 275).Value
   W.Text_résult_6_ini = .Offset(TargetRow, 276).Value
   W.Text_dlr_6_pre_ini = .Offset(TargetRow, 277).Value
   W.Text_dlr_6_post_ini = .Offset(TargetRow, 278).Value
   W.Text_obs_6_ini = .Offset(TargetRow, 279).Value
   
   
   
   
   
   
   
   
    W.Text_date_pod_1_ini = .Offset(TargetRow, 280).Text                                                                'date podométrie ini
    W.Text_date_pod_2_ini = .Offset(TargetRow, 281).Text
    W.Text_date_pod_3_ini = .Offset(TargetRow, 282).Text
    W.Text_date_pod_4_ini = .Offset(TargetRow, 283).Text
    W.Text_date_pod_5_ini = .Offset(TargetRow, 284).Text
    W.Text_date_pod_6_ini = .Offset(TargetRow, 285).Text
    W.Text_date_pod_7_ini = .Offset(TargetRow, 286).Text
    W.Text_date_pod_8_ini = .Offset(TargetRow, 287).Text
    
   
   
     
  For i = 1 To 8
      W.Controls("Text_result_podo" & i & "_ini") = .Offset(TargetRow, 287 + i)                                                'résultat podométrie ini
      Next i
   
   
   
   W.Combo_poignet_ini = .Offset(TargetRow, 296).Value
   W.Text_com_podo_ini = .Offset(TargetRow, 297).Value
   W.Combo_CAP_ini = .Offset(TargetRow, 298).Value
   W.Text_marche_ini = .Offset(TargetRow, 299).Value
   W.Text_obs_marche_ini = .Offset(TargetRow, 300).Value
   W.Text_planche_ini = .Offset(TargetRow, 301).Value
   W.Text_planche_obs_ini = .Offset(TargetRow, 302).Value
   W.Text_corde_ini = .Offset(TargetRow, 303).Value
   W.Text_corde_obs_ini = .Offset(TargetRow, 304).Value
   W.Text_saut_1_ini = .Offset(TargetRow, 305).Value
   W.Text_saut_2_ini = .Offset(TargetRow, 306).Value
   W.Text_saut_obs_ini = .Offset(TargetRow, 307).Value
   W.Text_push_ini = .Offset(TargetRow, 308).Value
   W.Text_push_obs_ini = .Offset(TargetRow, 309).Value
   W.Text_chaise_ini = .Offset(TargetRow, 310).Value
   W.Text_chaise_obs_ini = .Offset(TargetRow, 311).Value
   W.Text_equi_d1_ini = .Offset(TargetRow, 312).Value
   W.Text_equi_d2_ini = .Offset(TargetRow, 313).Value
   W.Text_equi_d3_ini = .Offset(TargetRow, 314).Value
   W.Combo_45sd_ini = .Offset(TargetRow, 315).Value
   W.Text_equi_g1_ini = .Offset(TargetRow, 316).Value
   W.Text_equi_g2_ini = .Offset(TargetRow, 317).Value
   W.Text_equi_g3_ini = .Offset(TargetRow, 318).Value
   W.Combo_45sg_ini = .Offset(TargetRow, 319).Value
   W.Text_equi_obs_ini = .Offset(TargetRow, 320).Value
   W.Text_stress_pré_ini = .Offset(TargetRow, 321).Value
   W.Text_stress_act_ini = .Offset(TargetRow, 322).Value
   W.Text_energie_pre_ini = .Offset(TargetRow, 323).Value
   W.Text_energie_act_ini = .Offset(TargetRow, 324).Value
   W.Text_kinap_capacites_ini = .Offset(TargetRow, 325).Value
   W.Text_kinap_craintes_ini = .Offset(TargetRow, 326).Value
   W.Text_kinap_tsk_ini = .Offset(TargetRow, 327).Value
   W.Text_tsk_appr_ini = .Offset(TargetRow, 328).Value
   W.Text_assisdebout_ini = .Offset(TargetRow, 329).Value
   W.Text_assisdebout_com_ini = .Offset(TargetRow, 330).Value
   W.Text_sign_ini = .Offset(TargetRow, 331).Value
   W.Text_date_eval_fin = .Offset(TargetRow, 332).Value
   W.Text_taille_fin = .Offset(TargetRow, 333).Value
   W.Text_poids_fin = .Offset(TargetRow, 334).Value
   W.Text_ct_fin = .Offset(TargetRow, 335).Value
   W.Text_com_pds_fin = .Offset(TargetRow, 336).Value
   W.Text_tas_fin = .Offset(TargetRow, 337).Value
   W.Text_tad_fin = .Offset(TargetRow, 338).Value
   W.Text_fc_fin = .Offset(TargetRow, 339).Value
   W.Text_gly_fin = .Offset(TargetRow, 340).Value
   W.Text_mg_fin = .Offset(TargetRow, 341).Value
   W.Text_mm_fin = .Offset(TargetRow, 342).Value
   W.Text_mh_fin = .Offset(TargetRow, 343).Value
   W.Text_pg_fin = .Offset(TargetRow, 344).Value
   W.Text_fr_age_fin = .Offset(TargetRow, 345).Value
   W.Text_fr_obesite_fin = .Offset(TargetRow, 346).Value
   
   
   
   For i = 1 To 7
      W.Controls("Combo_fr" & i & "_fin") = .Offset(TargetRow, 346 + i) 'facteurs de risque fin
      Next i
   
   
   
   
   W.Combo_malconnu1_fin = .Offset(TargetRow, 354).Value
   W.Combo_malconnu2_fin = .Offset(TargetRow, 355).Value
   W.Text_passe_sportif_fin = .Offset(TargetRow, 356).Value
   
   For i = 1 To 9
      W.Controls("Text_ps" & i & "_fin") = .Offset(TargetRow, 356 + i) 'Atcd sportif fin
      Next i
   
   
   
   W.Text_passe_actif_fin = .Offset(TargetRow, 366).Value
   
   For i = 1 To 9
      W.Controls("Text_pa" & i & "_fin") = .Offset(TargetRow, 366 + i) 'Atcd actif fin
      Next i
   
   
   W.Text_apactuelle_fni = .Offset(TargetRow, 376).Value
   
   For i = 1 To 9
      W.Controls("Text_ap" & i & "_fin") = .Offset(TargetRow, 376 + i) 'AP actuelle fin
      Next i
   
   
   W.Text_materiel_fin = .Offset(TargetRow, 386).Value
   W.Text_AP_commentaires_fin = .Offset(TargetRow, 387).Value
   W.Text_nbrepas_fin = .Offset(TargetRow, 388).Value
   W.Text_nbcoll_fin = .Offset(TargetRow, 389).Value
   W.Text_hydra_fin = .Offset(TargetRow, 390).Value
   W.Text_alcool_fin = .Offset(TargetRow, 391).Value
   W.Text_cafe_fin = .Offset(TargetRow, 392).Value
   W.Text_boisson_sucrees_fin = .Offset(TargetRow, 393).Value
   W.Text_dej_fin = .Offset(TargetRow, 394).Value
   W.TextBox_diner_fin = .Offset(TargetRow, 395).Value
   W.Text_souper_fin = .Offset(TargetRow, 396).Value
   W.Text_alim_comment_fin = .Offset(TargetRow, 397).Value
   W.Text_alim_remplacement_fin = .Offset(TargetRow, 398).Value
   W.Text_tabac_fin = .Offset(TargetRow, 399).Value
   W.Text_stress_pré_fin = .Offset(TargetRow, 400).Value
   W.Text_stress_act_fin = .Offset(TargetRow, 401).Value
   W.Text_energie_pre_fin = .Offset(TargetRow, 402).Value
   W.Text_energie_act_fin = .Offset(TargetRow, 403).Value
   W.Text_date_leapa_fin = .Offset(TargetRow, 404).Value
   W.Combo_cardio_fin = .Offset(TargetRow, 405).Value
   W.Combo_inf_fin = .Offset(TargetRow, 406).Value
   W.Combo_app_fin = .Offset(TargetRow, 407).Value
   W.Combo_prot_fin = .Offset(TargetRow, 408).Value
   W.Text_duree_test_fin = .Offset(TargetRow, 409).Value
   W.Text_descri_fin = .Offset(TargetRow, 410).Value
   W.Text_fc_repos_fin = .Offset(TargetRow, 411).Value
   W.Text_TA_repos_fin = .Offset(TargetRow, 412).Value
   W.Text_EPE_fin_fin = .Offset(TargetRow, 413).Value
   W.Text_vit_tapis_max_fin = .Offset(TargetRow, 414).Value
   W.Text_pente_max_fin = .Offset(TargetRow, 415).Value
   W.Text_vit_ergo_max_fin = .Offset(TargetRow, 416).Value
   W.Text_charge_ergo_max_fin = .Offset(TargetRow, 417).Value
   W.Text_dlr_pre_fin = .Offset(TargetRow, 418).Value
   W.Text_dlr_post_fin = .Offset(TargetRow, 419).Value
   W.Text_FCRmin_fin = .Offset(TargetRow, 420).Value
   W.Text_FCRmax_fin = .Offset(TargetRow, 421).Value
   W.Combo_rapport_leapa_fin = .Offset(TargetRow, 422).Value
   
   For i = 1 To 16
      W.Controls("Text_fc_" & i & "_fin") = .Offset(TargetRow, 422 + i) 'fc fin
      Next i
   
   
   
    For i = 1 To 8
      W.Controls("Text_TAS" & i & "_fin") = .Offset(TargetRow, 442 + i) 'TAS fin
      Next i
   
    For i = 1 To 8
      W.Controls("Text_TAD" & i & "_fin") = .Offset(TargetRow, 452 + i) 'TAD fin
      Next i
   
   For i = 1 To 16
      W.Controls("Text_epe" & i & "_fin") = .Offset(TargetRow, 462 + i) 'EPE fin
      Next i
  
   For i = 1 To 16
      W.Controls("Text_dlr" & i & "_fin") = .Offset(TargetRow, 482 + i) 'Dlr fin
      Next i
   
   
   For i = 1 To 16
      W.Controls("Text_vit" & i & "_fin") = .Offset(TargetRow, 502 + i) 'vit fin
      Next i
      
   For i = 1 To 16
      W.Controls("Text_pente" & i & "_fin") = .Offset(TargetRow, 522 + i) 'pente fin
      Next i
 
   

   
   
   
   
   W.Text_raison_arret_fin = .Offset(TargetRow, 543).Value
   W.Text_com_cardio_fin = .Offset(TargetRow, 544).Value
   W.Text_evol_fc_fin = .Offset(TargetRow, 545).Value
   W.Text_recup_fin = .Offset(TargetRow, 546).Value
   W.Text_dlr_text_fin = .Offset(TargetRow, 547).Value
   W.Text_obs_effort_fin = .Offset(TargetRow, 548).Value
   W.Text_leapa_text_perso_fin = .Offset(TargetRow, 549).Value
   W.Combo_CAP_fin = .Offset(TargetRow, 550).Value
   W.Text_marche_fin = .Offset(TargetRow, 551).Value
   W.Text_obs_marche_fin = .Offset(TargetRow, 552).Value
   W.Text_planche_fin = .Offset(TargetRow, 553).Value
   W.Text_planche_obs_fin = .Offset(TargetRow, 554).Value
   W.Text_corde_fin = .Offset(TargetRow, 555).Value
   W.Text_corde_obs_fin = .Offset(TargetRow, 556).Value
   W.Text_saut_1_fin = .Offset(TargetRow, 557).Value
   W.Text_saut_2_fin = .Offset(TargetRow, 558).Value
   W.Text_saut_obs_fin = .Offset(TargetRow, 559).Value
   W.Text_push_fin = .Offset(TargetRow, 560).Value
   W.Text_push_obs_fin = .Offset(TargetRow, 561).Value
   W.Text_chaise_fin = .Offset(TargetRow, 562).Value
   W.Text_chaise_obs_fin = .Offset(TargetRow, 563).Value
   W.Text_kinap_capacites_fin = .Offset(TargetRow, 564).Value
   W.Text_kinap_craintes_fin = .Offset(TargetRow, 565).Value
   W.Text_kinap_tsk_fin = .Offset(TargetRow, 566).Value
   W.Text_tsk_appr_fin = .Offset(TargetRow, 567).Value
   W.Combo_poignet_fin = .Offset(TargetRow, 568).Value
   
   For i = 1 To 8
      W.Controls("Text_date_pod_" & i & "_fin") = .Offset(TargetRow, 568 + i) 'Date podo fin
      Next i
   
   For i = 1 To 8
      W.Controls("Text_result_podo" & i & "_fin") = .Offset(TargetRow, 576 + i) 'Résultats podo fin
      Next i
   
  
   W.Text_com_podo_fin = .Offset(TargetRow, 585).Value
   W.Combo_dom_preh_fin = .Offset(TargetRow, 586).Value
   W.Text_MSG_1_fin = .Offset(TargetRow, 587).Value
   W.Text_MSG_2_fin = .Offset(TargetRow, 588).Value
   W.Text_MSG_3_fin = .Offset(TargetRow, 589).Value
   W.Text_MSD_1_fin = .Offset(TargetRow, 590).Value
   W.Text_MSD_2_fin = .Offset(TargetRow, 591).Value
   W.Text_MSD_3_fin = .Offset(TargetRow, 592).Value
   W.Text_preh_obs_fin = .Offset(TargetRow, 593).Value
   W.Text_equi_g1_fin = .Offset(TargetRow, 594).Value
   W.Text_equi_g2_fin = .Offset(TargetRow, 595).Value
   W.Text_equi_g3_fin = .Offset(TargetRow, 596).Value
   W.Combo_45sg_fin = .Offset(TargetRow, 597).Value
   W.Text_equi_d1_fin = .Offset(TargetRow, 598).Value
   W.Text_equi_d2_fin = .Offset(TargetRow, 599).Value
   W.Text_equi_d3_fin = .Offset(TargetRow, 600).Value
   W.Combo_45sd_fin = .Offset(TargetRow, 601).Value
   W.Text_equi_obs_fin = .Offset(TargetRow, 602).Value
   W.Text_dlr_6_pre_fin = .Offset(TargetRow, 603).Value
   W.Text_dlr_6_post_fin = .Offset(TargetRow, 604).Value
   W.Text_résult_6_fin = .Offset(TargetRow, 605).Value
   W.Text_obs_6_fin = .Offset(TargetRow, 606).Value
   W.Text_assisdebout_fin = .Offset(TargetRow, 607).Value
   W.Text_assisdebout_com_fin = .Offset(TargetRow, 608).Value
   W.Text_conclu_fin = .Offset(TargetRow, 609).Value
   W.Text_sign_fin = .Offset(TargetRow, 610).Value
End With




'''End retrieving data from database'''

W.Caption = "Modifier" 'set caption to show that the user is editing
W.Show 'show the user form with the details loaded in

End Sub


Private Sub Text_dossier_choix_Change()

If Len(Text_dossier_choix.Text) >= 5 Then
     On Error Resume Next
   ColumnE_Menu.Text = Application.WorksheetFunction. _
        VLookup(CLng(Text_dossier_choix.Text), Worksheets("Data").Range("D8:Dyn_Full_Name"), 2, False) 'clng pour rechercher chiffres et parenthèses au mot "dossier"

Else
 ColumnE_Menu.Text = ""
End If


End Sub




Private Sub UserForm_Click()

End Sub


Thanks in advance for your help

JP
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top