bonjour,
je souhaite afficher un message d'erreur si toutes les cases ne sont pas remplies. Mais j'ai un problème au niveau de ma boucle, je n'arrive pas à la faire tourner jusqu'à "point+1". voici mon code:
merci
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 Private Sub CommandButton6_Click() Dim point As Integer Dim i As Integer Dim x As Integer point = Range("C5").Value x = 11 Dim cel As Range, z As String For i = 1 To point + 1 For Each cel In Cells(x, 2) x = x + 1 If cel.Value = "" Then z = z & Chr(10) & cel.Address Next Next i If z <> "" Then MsgBox "Veuillez compléter les cellules suivantes :" & Chr(10) & z Exit Sub End If End Sub
Partager