Bonjour,
j'ai un soucis sur mon vba
une fois que j'arrive à ma cellule recherchée je tombe sur ma cellule qu'il devrait trouver
quand je suis sur
If .Cells(row_index, 3) = TextBoxAddress.Value Then
cela me donne en équation 1="1"
voici le code complet
Private Sub btnFindProductsFromAddress_Click()
Dim row_index As Long
Dim msg As String
If TextBoxAddress.Value = "" Then
MsgBox ("veuillez selectionner une adresse")
Exit Sub
End If
LockExcel
With BaseSheet
For row_index = 2 To LastRowIndex(BaseSheet)
If .Cells(row_index, 3) = TextBoxAddress.Value Then
If msg <> "" Then msg = msg & vbCrLf
msg = msg & TextBoxAddress.Value & " : " & .Cells(row_index, 4) & " * " & .Cells(row_index, 1) & " - " & .Cells(row_index, 2)
End If
Next row_index
End With
UnLockExcel
If msg = "" Then msg = "Aucune référence à l'emplacement " & TextBoxAddress.Value
MsgBox msg
End Sub
Merci a vous