LIBRO se congela al ejecutar macro
Tengo este código en un formulario con un listbox el problema es que se me congela el LIBRO al ejecutar esta macro
Set h2 = Sheets("Clientes")
folio = CONSULTA_CLIENTE.ListBox1.List(ListBox1.ListIndex, 1)
If folio = "" Then
MsgBox "Pon algo en el label"
Exit Sub
End If
Set r = h2.Columns("C") 'rango de búsqueda
Set b = r.Find(folio, lookat:=xlWhole) 'busca folio
If Not b Is Nothing Then
celda = b.Address
Do
'Datos del cliente
Set b = Sheets("clientes").Columns("C").Find(TextBox2, lookat:=xlWhole)
If Not b Is Nothing Then
MsgBox "Este cliente ya esta registrado, Guardalo de direfente manera para continuar", vbExclamation, "INFORMACÍON"
Exit Sub
End If
h2.Cells(b.Row, "C") = TextBox3.Value
TextBox1.Value = Empty
Set b = r.FindNext(b)
Loop While Not b Is Nothing And b.Address <> celda
Else
MsgBox "El folio no existe"
End If
End Subalguna sugerencia?
1 Respuesta
Respuesta de Dante Amor
1


