S
Stefan_matlos
Guest
Bonjour et merci a tous et a toutes
voila un code, mais je veux copier les elements A4,B4 de ma feuille bases articles et le mettre en feuille devis a partir de A16, probleme avec derlign
par avabce merci
Private Sub CommandButton1_Click()
Dim c As Range
Dim plg As Range
Dim derlign As Long
If ComboBox1.Value = "" Then
Unload Me
Exit Sub
End If
derlign = Sheets("Devis").Range("A65536").End(x1Up).Row
Set plg = Sheets("Base Articles").Range("A4:A" & Sheets("Base Articles").Range("A65536").End(xlUp).Row)
Set c = plg.Find(ComboBox1.Value)
If Not c Is Nothing Then
c.Resize(1, 2).Copy Sheets("Devis").Range("A16" & derlign + 1)
End If
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim cell As Range
With Sheets("base Articles")
For Each cell In .Range("A4:A" & .Range("A65536").End(xlUp).Row)
ComboBox1.AddItem cell
Next
End With
End Sub
voila un code, mais je veux copier les elements A4,B4 de ma feuille bases articles et le mettre en feuille devis a partir de A16, probleme avec derlign
par avabce merci
Private Sub CommandButton1_Click()
Dim c As Range
Dim plg As Range
Dim derlign As Long
If ComboBox1.Value = "" Then
Unload Me
Exit Sub
End If
derlign = Sheets("Devis").Range("A65536").End(x1Up).Row
Set plg = Sheets("Base Articles").Range("A4:A" & Sheets("Base Articles").Range("A65536").End(xlUp).Row)
Set c = plg.Find(ComboBox1.Value)
If Not c Is Nothing Then
c.Resize(1, 2).Copy Sheets("Devis").Range("A16" & derlign + 1)
End If
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim cell As Range
With Sheets("base Articles")
For Each cell In .Range("A4:A" & .Range("A65536").End(xlUp).Row)
ComboBox1.AddItem cell
Next
End With
End Sub