1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| For i = 1 To 8 ' on parcours les colonnes
If tab_constats(1, i) Then
Set obj = getControl(tab_CB(1, i) & "_et1", wordDoc) ' OUI
Else
Set obj = getControl(tab_CB(1, i) & "_et10", wordDoc) ' NON
End If
If Not obj Is Nothing Then
obj.Object.Value = True
End If
If tab_constats(2, i) <> "ERREUR" Then
Set obj = getControl(tab_CB(1, i) & "_et" & tab_constats(2, i), wordDoc)
If Not obj Is Nothing Then
obj.Object.Value = True
End If
End If
If tab_constats(3, i) Then
Set obj = getControl(tab_CB(1, i) & "_ch11", wordDoc) ' OUI
Else
Set obj = getControl(tab_CB(1, i) & "_ch101", wordDoc) ' NON
End If
If Not obj Is Nothing Then
obj.Object.Value = True
End If
If tab_constats(4, i) <> "ERREUR" Then
Set obj = getControl(tab_CB(1, i) & "_ch" & tab_constats(4, i) & "1", wordDoc)
If Not obj Is Nothing Then
obj.Object.Value = True
End If
End If
If tab_constats(5, i) <> "ERREUR" Then
Set obj = getControl(tab_CB(1, i) & "_" & tab_constats(5, i), wordDoc)
If Not obj Is Nothing Then
obj.Object.Value = True
End If
End If
Next i |
Partager