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 37 38 39 40 41 42
| Sub calculette()
Dim module As String
Dim cdedt As Integer
Dim age As Integer
Dim T1
Dim rachatfr As Integer
Dim T1XM
Dim T1T2XM
Dim gt As Integer
module = InputBox("choisir le nom du module")
Sheets(module).Activate
cdedt = InputBox("saisir la classe, la franchise et la limite")
age = InputBox("saisir l'âge de l'assuré")
rachatfr = InputBox("si rachat franchise, tapez 1, si non, tapez 0")
gt = InputBox("saisir le numéro de la GT")
n = 10000
For i = 1 To n
If gt = Cells(i, 1).Value Then
If cdedt = Cells(i, 7).Value Then
If age = Cells(i, 8).Value Then
If rachatfr = 1 Then
T1 = Cells(i, 9).Value
T1XM = Cells(i, 13).Value
T1XMT2 = Cells(i, 15).Value
MsgBox ("T1 est égal à " & T1)
MsgBox ("T1 - XM = " & T1XM)
MsgBox ("T1 - XM x T2 = " & T1XMT2)
Else
T1 = Cells(i, 9).Value
T1XM = Cells(i, 13).Value
MsgBox ("T1 = " & T1)
MsgBox ("T1 - XM = " & T1XM)
End If
End If
End If
End If
Next i
End Sub |
Partager