Te anexo la primera parte
Dim h1, h2, h3, h4
'
Private Sub ComboBox1_Change()
'Por.Dante Amor
Label2.Caption = ""
Label3.Caption = ""
If ComboBox1.Value = "" Or ComboBox1.ListIndex = -1 Then Exit Sub
'
fila = ComboBox1.ListIndex + 2
Label2.Caption = h1.Cells(fila, "A")
Label3.Caption = h1.Cells(fila, "C")
End Sub
'
Private Sub CommandButton1_Click()
'Por.Dante Amor
If ListBox1.ListIndex = -1 Then
MsgBox "Selecciona un artículo"
Exit Sub
End If
If TextBox2 = "" Or TextBox2 = 0 Then
MsgBox "Captura la cantidad"
Exit Sub
End If
ListBox2.AddItem ListBox1.List(ListBox1.ListIndex, 0)
ListBox2.List(ListBox2.ListCount - 1, 1) = TextBox2
End Sub
'
Private Sub TextBox1_Change()
'Por.Dante Amor
ListBox1 = ""
h4.Cells.Clear
h2.Rows(1).Copy h4.Rows(1)
If TextBox1.Value = "" Then Exit Sub
'
j = 2
For i = 2 To h2.Range("B" & Rows.Count).End(xlUp).Row
If LCase(h2.Cells(i, "B").Value) Like "*" & LCase(TextBox1.Value) & "*" Then
h2.Rows(i).Copy h4.Rows(j)
h4.Cells(i, "L") = i
j = j + 1
End If
Next
If j > 2 Then
ListBox1.RowSource = h4.Name & "!" & h4.Range("A2:L" & h4.Range("B" & Rows.Count).End(xlUp).Row).Address
End If
End Sub
'
Private Sub UserForm_Activate()
'Por.Dante Amor
Set h1 = Sheets("CLIENTES")
Set h2 = Sheets("ARTICULOS")
Set h3 = Sheets("VENTAS")
Set h4 = Sheets("TEMP")
'
'carga clientes
For i = 2 To h1.Range("B" & Rows.Count).End(xlUp).Row
ComboBox1.AddItem h1.Cells(i, "B")
Next
End Sub
sal u dos