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
| Private Sub New_component_Change()
Dim wb As Workbook
Dim var As Variant
var = New_component.Value 'textbox principale
Workbooks("Editeur_ecn.xls").Worksheets("EENSART_REF").Activate
For Each cell In Range("A1:A65536")
If cell.Value = var Then
ActiveCell.Select
With ActiveCell
New_desfr = .Offset(0, 2) 'textbox de renvoie
New_adddesfr = .Offset(0, 3) 'textbox de renvoie
End With
For Each wb In Workbooks
If Left(wb.Name, 1) = "F" Then
Workbooks(wb.Name).Worksheets("ECN Number").Activate
Exit For
End If
Next
End If
Next cell
End Sub |
Partager