Con lo siguiente se determina cuáles turnos ya fueron ocupados.
Private Sub UserForm_Activate()
'Por.Dante Amor
Set ha = Sheets("asignaciones")
ListBox1.Clear
For i = 1 To Sheets("TURNOS").Range("A" & Rows.Count).End(xlUp).Row
ListBox1.AddItem Sheets("TURNOS").Cells(i, "A")
Next
'
With UserForm1
LCur = .ListBox1.List(.ListBox1.ListIndex, 0)
LFac = .ComboBox2
LCic = .ComboBox3
End With
'busca cursos en el listbox2
For i = 0 To UserForm1.ListBox2.ListCount - 1
If UserForm1.ListBox2.List(i, 0) = LCur And _
UserForm1.ListBox2.List(i, 1) = LFac And _
UserForm1.ListBox2.List(i, 2) = LCic Then
turno = UserForm1.ListBox2.List(i, 3)
For n = 0 To ListBox1.ListCount - 1
If ListBox1.List(n) = turno Then
ListBox1.RemoveItem n
Exit For
End If
Next
End If
Next
'busca cursos en asignaciones
For i = 2 To ha.Range("A" & Rows.Count).End(xlUp).Row
If ha.Cells(i, "B") = LCur And _
ha.Cells(i, "C") = LFac And _
ha.Cells(i, "D") = LCic Then
turno = ha.Cells(i, "E")
For n = 0 To ListBox1.ListCount - 1
If ListBox1.List(n) = turno Then
ListBox1.RemoveItem n
Exit For
End If
Next
End If
Next
'
End Sub
Recibe un cordial saludo y felices fiestas! Dante Amor
No olvides valorar la respuesta.