Control de stock en VBA, aparición de datos en el form
Estoy desarrollando un control de stock.
Actualmente estoy atascado,
(asi es como estan todos los datos)
Columna A grupo genérico, columna B especifico, columna C el producto y DE proveedor
El problema va cuando quiero condicionar la columna D (las otros 3 desplegables se condicionan bien pero este no)

Private Sub UserForm_Activate()
Set h2 = Sheets("full2")
For i = 2 To h2.Range("A" & Rows.Count).End(xlUp).Row
Call agregar(generic, h2.Cells(i, "A"))
Next
End Sub
Sub agregar(combo As ComboBox, dato As String)
For i = 0 To combo.ListCount - 1
Select Case StrComp(combo.List(i), dato, vbTextCompare)
Case 0: Exit Sub
Case 1: combo.AddItem dato, i: Exit Sub
End Select
Next
combo.AddItem dato
End Sub
Private Sub generic_Change()
especific.Clear
especific2.Clear
Set h2 = Sheets("full2")
For i = 2 To h2.Range("A" & Rows.Count).End(xlUp).Row
If h2.Cells(i, "A").Value = generic.Value Then
Call agregar(especific, h2.Cells(i, "B"))
End If
Next
End Sub
Private Sub especific_Change()
especific2.Clear
Set h2 = Sheets("full2")
For i = 2 To h2.Range("A" & Rows.Count).End(xlUp).Row
If h2.Cells(i, "A").Value = generic.Value And _
h2.Cells(i, "B").Value = especific.Value Then
Call agregar(especific2, h2.Cells(i, "C"))
End If
Next
End SubMe faltaria que salieran los proveedores y los costes unitarios del producto
los nombres de los textbox son:
proveedores.value y preciounitario.value
1 Respuesta
Respuesta de Ivan Cuenca
1