Hola!
Tengo un código espectacular!
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Msj As String
If Intersect(Target, Range("e34")) Is Nothing Then Exit Sub
If IsEmpty(Target) Then Exit Sub
With Worksheets("clientes")
If Target.Address <> "$E$34" Then GoTo Nombre
Worksheets("clientes").Protect "123"
If Not Evaluate("iserror(c34)") Then Exit Sub
Worksheets("clientes").Protect "123"
If MsgBox("El codigo solicitado: " & Target & " NO existe..." & vbCr & _
"Confirmas que debe darse de alta ?", vbYesNo, _
"Alta de clientes...") = vbNo Then Exit Sub
Worksheets("clientes").Unprotect "123"
SendKeys "{down " & Application.CountA(.[a:a]) - 1 & "}" & Target & "{tab}"
.ShowDataForm
.[a:b].Sort key1:=.[a2], order1:=xlAscending, header:=xlYes
Target.Select
Worksheets("clientes").Protect "123"
Exit Sub
End With
Nombre:
If Application.CountIf([b4:b18], Target) > 1 Then Msj = " esta duplicado !!!"
If Application.VLookup(Target, Worksheets("compras").[a:g], 7, 0) > 0 _
Then Msj = " es un producto YA facturado !!!"
If Msj <> "" Then MsgBox "El serial " & Target & Msj: Target.ClearContents
End Sub
Funciona muy bien, pero después de crear un nuevo cliente, cuando regresa a
la hoja “menú” para continuar introduciendo información, remarca un borde al
rededor de las celdas E34 y E35, como si las estuviese remarcando. Este
efecto visual no se quita haciendo clic en otras celdas. Este efecto visual
no permite ver donde está ubicado el cursor.
Esto tiene solución?
Saludos cordiales,
Griego59
Leer las respuestas