L'indice ne correspond pas à la selection
Résolu
Ctesias
Messages postés
786
Statut
Membre
-
Ctesias Messages postés 786 Statut Membre -
Ctesias Messages postés 786 Statut Membre -
Bonjour,
Voila:
"L'indice ne correspond pas à la selection" en surlignant :
"If Sheets("INFORMATIONS").Cells(18, 4).Text = Sheets("Grande").Cells(16, i).Value Then"
je ne comprend pas pourquoi....
Ctesias,
Voila:
Private Sub CommandButton2_Click()
For i = 1 To 6
If Sheets("INFORMATIONS").Cells(18, 4).Text = Sheets("Grande").Cells(16, i).Value Then
Sheets("Grande").Cells(17, i).Value = Sheets("INFORMATIONS").Cells(18, 5).Value
End If
Next
End Sub
"L'indice ne correspond pas à la selection" en surlignant :
"If Sheets("INFORMATIONS").Cells(18, 4).Text = Sheets("Grande").Cells(16, i).Value Then"
je ne comprend pas pourquoi....
Ctesias,
A voir également:
- L'indice ne correspond pas à la selection
- Indice téléphonique - Guide
- Quel service d'internet permet à son navigateur de trouver l’adresse ip qui correspond à bipm.org ? - Forum Webmastering
- L'indice n'appartient pas à la sélection vba - Forum VB / VBA
- Variable workbook : l'indice n'appartient pas à la sélection ✓ - Forum Excel
- Le téléphone de votre correspondant n'est pas disponible - Forum Mobile
3 réponses
Bonjour,
tu as essayé en remplaçant Cells(18, 4).Text par Cells(18, 4).Value ?
Il me semble que cela peut régler le problème.
tu as essayé en remplaçant Cells(18, 4).Text par Cells(18, 4).Value ?
Il me semble que cela peut régler le problème.
Yep, c'etait le premier truc que j'avais essayé,mais ca ne regle pas le probleme :s
Bonjour,
Essaye ceci d'abord :
A toi d'adapter Result As ... type de variable adéquat.
Essaye ceci d'abord :
Private Sub CommandButton2_Click()
Dim Chaine As String, Result As String
With Sheets("INFORMATIONS")
Chaine = .Cells(18, 4).Text
Result = .Cells(18, 5).Value
End With
For i = 1 To 6
With Sheets("Grande")
If .Cells(16, i).Value = Chaine Then
.Cells(17, i).Value = Result
End If
End With
Next
End Sub
A toi d'adapter Result As ... type de variable adéquat.