Combobox busca y muestra en otro combobox, no muestra demás datos de la fila de almacenamiento
Tengo el siguiente código
Private Sub ComboBoxMatricula_Change()
Application.ScreenUpdating = False
TextBoxNombreAlumno.Enabled = False
Sheets("LISTA DE ALUMNOS").Activate
On Error Resume Next
Cells(ComboBoxMatricula.ListIndex + 3, 1).Select
TextBoxNombreAlumno = ActiveCell(0, 2)
'buscar pacientes por.DAM
ComboBoxPaciente.Clear
Set h2 = Sheets("HISTORIAL DE TRATAMIENTOS")
h2.Select
Set r = h2.Range("C10:C1000")
Set s = r.Find(ComboBoxMatricula)
If Not s Is Nothing Then
ncell = s.Address
Do: Set s = r.FindNext(s)
If Not s Is Nothing Then _
ComboBoxPaciente.AddItem Cells(s.Row, s.Column + 2)
Loop While Not s Is Nothing And s.Address <> ncell
End If
End Suby al seleccionar uno de los pacientes atendidos se ejecuta lo siguiente....
Private Sub ComboBoxPaciente_Change()
Application.ScreenUpdating = False
Sheets("HISTORIAL DE TRATAMIENTOS").Activate
On Error Resume Next
ComboBoxPaciente = ComboBoxPaciente.Text
Cells(ComboBoxPaciente.ListIndex + 10, 1).Select
ComboBoxTratamientos = ActiveCell.Offset(0, 7)
TextBoxCantidad = ActiveCell.Offset(0, 8)
TextBoxDatoAdicional = ActiveCell.Offset(0, 9)
TextBoxFolio = ActiveCell.Offset(0, 11) 'regresa folio
TextBoxStatus = ActiveCell.Offset(0, 12) 'regresa status
ComboBoxBimestre = ActiveCell.Offset(0, 13) 'regresa el bimestre cargado
TextBoxComentarios = ActiveCell.Offset(0, 14) ' REGRESA EL COMENTARIOel detalle está que no me devuelve la información que le corresponde al paciente selecciónado en el ComboBoxPaciente sino que me muestra la información almacenada de la primera fila.
No se en que ando fallando en esta parte del código, agradezco tu valiosísima ayuda!!!
1 Respuesta
Respuesta de Dante Amor
1