Como puedo fucionar estas 2 macros, (convertir a mayúscula automaticamente
publicado
Hola a todos nesecito de su ayuda, antes esta funcion de estas 2 formulas me corrian, esta macro convierte la celda en mayuscula y a la vez incresas 2 veces datos y automaticamente se bloquea la celda.
--------------------------------------------------------------------
Esta es la formula la que antes me corria bien:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Intersect(Target, [d33:f33]) Is Nothing Then
Target.Value = UCase(Target.Value)
Hoja6.[a1] = Hoja6.[a1] + 1
Application.EnableEvents = True
If Hoja6.[a1] >= 3 Then
ActiveSheet.Unprotect "colorbol54321.-"
[d33:f33].Locked = True
ActiveSheet.Protect "colorbol54321.-"
MsgBox "Se ha bloqueado la celda para su protección.", vbInformation, "Registro Pedagógico v6.5"
End If
End If
End Sub
------------------------------------------------------
Quiero ingresar esto a la anterior macro de arriba:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
Target.Value = vab.UCase(Target.Value)
Application.EnableEvents = True
On Error GoTo 0
End Sub
----------------------
Gracias
Featured Replies
Archivado
Este tema está ahora archivado y está cerrado a más respuestas.
Hola a todos nesecito de su ayuda, antes esta funcion de estas 2 formulas me corrian, esta macro convierte la celda en mayuscula y a la vez incresas 2 veces datos y automaticamente se bloquea la celda.
--------------------------------------------------------------------
Esta es la formula la que antes me corria bien:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Intersect(Target, [d33:f33]) Is Nothing Then
Target.Value = UCase(Target.Value)
Hoja6.[a1] = Hoja6.[a1] + 1
Application.EnableEvents = True
If Hoja6.[a1] >= 3 Then
ActiveSheet.Unprotect "colorbol54321.-"
[d33:f33].Locked = True
ActiveSheet.Protect "colorbol54321.-"
MsgBox "Se ha bloqueado la celda para su protección.", vbInformation, "Registro Pedagógico v6.5"
End If
End If
End Sub
------------------------------------------------------
Quiero ingresar esto a la anterior macro de arriba:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
Target.Value = vab.UCase(Target.Value)
Application.EnableEvents = True
On Error GoTo 0
End Sub
----------------------
Gracias