H o l a : Te anexo el código para la captura y para guardar los datos en la hoja
Public h, h2
Private Sub btnGrabar_Click()
'Por.Dante Amor
u = h2.Range("A" & Rows.Count).End(xlUp).Row + 1
h2.Cells(u, "A") = txtMod.Text
h2.Cells(u, "B") = txtTrx.Text
h2.Cells(u, "C") = txtCodMov.Text
h2.Cells(u, "D") = txtNat.Text
h2.Cells(u, "E") = txtCarAbo.Text
h2.Cells(u, "F") = txtNomTran.Text
h2.Cells(u, "G") = txtProducto.Text
h2.Cells(u, "H") = ComboBox1.List(ComboBox1.ListIndex, 1)
h2.Cells(u, "I") = ComboBox1.Text
h2.Cells(u, "J") = ComboBox2.List(ComboBox2.ListIndex, 1)
h2.Cells(u, "K") = ComboBox2.Text
h2.Cells(u, "L") = ComboBox3.List(ComboBox3.ListIndex, 1)
h2.Cells(u, "M") = ComboBox3.Text
h2.Cells(u, "N") = ComboBox4.List(ComboBox4.ListIndex, 1)
h2.Cells(u, "O") = ComboBox4.Text
h2.Cells(u, "P") = ComboBox5.List(ComboBox5.ListIndex, 1)
h2.Cells(u, "Q") = ComboBox5.Text
h2.Cells(u, "R") = ComboBox6.List(ComboBox6.ListIndex, 1)
h2.Cells(u, "S") = ComboBox6.Text
h2.Cells(u, "T") = TextBox1.Text
MsgBox "Registro grabado", vbInformation
End Sub
'Por.Dante Amor
Private Sub ComboBox1_Change()
Call cargar(2)
End Sub
Private Sub ComboBox2_Change()
Call cargar(3)
End Sub
Private Sub ComboBox3_Change()
Call cargar(4)
End Sub
Private Sub ComboBox4_Change()
Call cargar(5)
End Sub
Private Sub ComboBox5_Change()
Call cargar(6)
End Sub
'
Private Sub UserForm_Activate()
'Por.Dante Amor
Set h = Worksheets("Niveles_FlujosCash")
Set h2 = Worksheets("Matriz")
For i = 2 To h.Range("A" & Rows.Count).End(xlUp).Row
Call agregar(ComboBox1, h.Cells(i, "A"), h.Cells(i, "G"))
Next
End Sub
Sub agregar(combo As ComboBox, dato As String, cod As String)
'Por.Dante Amor
For i = 0 To combo.ListCount - 1
Select Case StrComp(combo.List(i), dato, vbTextCompare)
Case 0: Exit Sub 'ya existe en el combo y ya no lo agrega
Case 1
combo.AddItem dato, i
combo.List(combo.ListCount - 1, 1) = cod
Exit Sub 'Es menor, lo agrega antes del comparado
End Select
Next
combo.AddItem dato 'Es mayor lo agrega al final
combo.List(combo.ListCount - 1, 1) = cod
End Sub
Sub cargar(ini)
'Por.Dante Amor
For i = ini To 6
Controls("ComboBox" & i).Clear
Next
For i = 2 To h.Range("A" & Rows.Count).End(xlUp).Row
For j = 1 To ini - 1
If h.Cells(i, j) = Controls("ComboBox" & j) Then
igual = True
Else
igual = False
Exit For
End If
Next
If igual Then Call agregar(Controls("ComboBox" & ini), h.Cells(i, ini), h.Cells(i, ini + 6))
Next
End Sub
'S aludos. Dante Amor. Recuerda valorar la respuesta. G racias