Prueba con esta macro
Private Sub ComboBox1_Change()
Set H1 = Sheets("HOJA1")
Set H2 = Sheets("HOJA2")
PRODUCTO = ComboBox1.Value
H2.Cells.Clear
TextBox1.Text = Empty
TextBox2.Text = Empty
TextBox3.Text = Empty
With H1.Range("A4").CurrentRegion
.AutoFilter 2, PRODUCTO
End With
CARGA
End Sub
Private Sub ListBox1_Click()
End Sub
Private Sub TextBox2_AFTERUPDATE()
Set H1 = Sheets("HOJA1")
INICIO = TextBox1.Text
FIN = TextBox2.Text
If INICIO <> Empty And FIN <> Empty Then
With H1.Range("A4").CurrentRegion
.AutoFilter Field:=3, Criteria1:=">=" & INICIO, Operator:=xlAnd, Criteria2:="<=" & FIN
End With
End If
CARGA
End Sub
Private Sub TextBox3_AFTERUPDATE()
Set H1 = Sheets("HOJA1")
NOMBRE = TextBox3
With H1.Range("A4").CurrentRegion
.AutoFilter 1, NOMBRE
CARGA
.AutoFilter 1
End With
End Sub
Private Sub UserForm_Initialize()
Sheets("HOJA2").Range("A2").CurrentRegion.Clear
With Sheets("HOJA1").Range("A4").CurrentRegion
.AutoFilter
FILAS = .Rows.Count: COL = .Columns.Count
End With
Set DATOS = Sheets("HOJA1").Range("A5").Resize(FILAS, COL)
With ListBox1
.RowSource = "HOJA1!" & DATOS.Address
.ColumnCount = COL
.ColumnHeads = True
End With
With DATOS
.Name = "DATOS"
.Columns(2).Copy
Sheets("HOJA1").Range("G5").PasteSpecial xlPasteValues
End With
With Sheets("HOJA1").Range("G5").CurrentRegion
.RemoveDuplicates Columns:=1
MATRIZ = .CurrentRegion
ComboBox1.List = MATRIZ
.Clear
End With
End Sub
Sub CARGA()
Set H1 = Sheets("HOJA1").Range("A4").CurrentRegion
Set H2 = Sheets("HOJA2").Range("A4")
H2.CurrentRegion.Clear
With H1
.Offset(1).Copy
H2.Range("A2").PasteSpecial
H2.Range("A2").CurrentRegion.Name = "TABLA"
.Rows(1).Copy
H2.Range("A1").PasteSpecial
End With
With ListBox1
.RowSource = "HOJA2!" & Range("TABLA").Address
End With
End Sub