Evitar dato repetido en una columna LISTINDEX
Tengo un listindex que tiene muchos datos, entonces hay alguna manera de que si aparezcan pero que no se seleccionen, simplemente diga "repetido" los datos a seleccionar son lo que están en la columna B:B
Este es el código que tengo al docle click:
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Set A = Sheets("HOJA DE SUELDOS")
filaedit = A.Range("A" & Rows.Count).End(xlUp).Row + 1
fila = Me.ListBox1.ListIndex
If ListBox1.List(fila, 1) = "" Then
MsgBox "No hay datos", vbInformation, "AVISO"
Exit Sub
End IfTextBox3.Value = ListBox1.List(fila, 1)
TextBox6.Value = ListBox1.List(fila, 4)
TextBox5.Value = ListBox1.List(fila, 3)
TextBox8.Value = ListBox1.List(fila, 0)
TextBox7 = Format(TextBox7, "$ #,0.00")
TextBox9 = Format(TextBox9, "$ #,0.00")
TextBox10 = Format(TextBox10, "$ #,0.00")
TextBox11 = Format(TextBox11, "$ #,0.00")
TextBox12 = Format(TextBox12, "$ #,0.00")
TextBox13 = Format(TextBox13, "$ #,0.00")
TextBox14 = Format(TextBox14, "$ #,0.00")
TextBox15 = Format(TextBox15, "$ #,0.00")
TextBox16 = Format(TextBox16, "$ #,0.00")
TextBox17 = Format(TextBox17, "$ #,0.00")
TextBox18 = Format(TextBox18, "$ #,0.00")
TextBox19 = Format(TextBox19, "$ #,0.00")
TextBox20 = Format(TextBox20, "$ #,0.00")
TextBox21 = Format(TextBox21, "$ #,0.00")
TextBox22 = Format(TextBox22, "$ #,0.00")
TextBox23 = Format(TextBox23, "$ #,0.00")
TextBox24 = Format(TextBox24, "$ #,0.00")end sub
Eso me mismo trae el problema, que en un botón al querer agregar un dato en la COL B:B si hay repetido no me deje hacerlo de lo contrario proceder. Espero su ayuda:: gracias
AQUI una imagen
"pepe toño" esta repetido por lo tanto que me salga en mi listbox pero que no me deje seleccionarlo hasta que lo elimine o cambie de nombre