Lorsque je lance maintenant mon inputbox marche bien avec des nombres à décimales mais il bloque lorsque je souhaite calculer mon MAX de cette façon:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
Sub M_Case()
 
Dim i As Integer
Dim j As Integer
 
Worksheets("Feuil3").Activate
 
 
i = 2
While i < 24
j = 2
While j < 24
Tab_Bord(i - 1, j - 1) = Cells(i, j).Value
j = j + 1
Wend
i = i + 1
Wend
 
 
i = 3
 
While i < 23
j = 3
While j < 23
Tab_Max(i - 2, j - 2) = WorksheetFunction.Max(Cells(i - 1, j - 1).Value, Cells(i - 1, j).Value _
, Cells(i - 1, j + 1).Value, Cells(i, j - 1).Value, Cells(i, j).Value, Cells(i, j + 1).Value, Cells(i + 1, j - 1).Value, Cells(i + 1, j).Value, Cells(i + 1, j + 1).Value)
j = j + 1
Wend
i = i + 1
Wend
 
i = 3
While i < 23
j = 3
While j < 23
Sheets("Feuil3").Cells(i, j).Value = Tab_Max(i - 2, j - 2)
j = j + 1
Wend
i = i + 1
Wend
End sub
Pourquoi cela ne fonctionne pas ?
Cordialement.