Jump to content

Automatizar un pequeño libro


Recommended Posts

Posted

he conseguido , que se pongan la fecha y la hora automatica , ahora quiero que se active la columna D y al introducir un dato se active la columna A , asi sucesivamente.

Private Sub Worksheet_Change(ByVal Target As Range)

If Not Application.Intersect(Target, Range("A:A")) Is Nothing Then

Range("B" & Target.Row) = Date

Range("C" & Target.Row) = Format(Now, "hh:mm")

ActiveSheet.Range("D").Select

f Not Application.Intersect(Target, Range("D:D")) Is Nothing Then

ActiveSheet.Range("A").Select

End If

End Sub

lo rojo esta mal .

EJEMPLO TABLA.rar

Guest sacfa
Posted

Prueba a ver si esto lo que buscas:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Not Intersect(ActiveCell, Columns(4)) Is Nothing Then

If ActiveCell > 0 Then

Application.SendKeys "{ENTER}"

End If

End If

End Sub

Posted

me da un error al introducirla , me dice se espera un End sub

Private Sub Worksheet_Change(ByVal Target As Range)

If Not Application.Intersect(Target, Range("A:A")) Is Nothing Then

Range("B" & Target.Row) = Date

Range("C" & Target.Row) = Format(Now, "hh:mm")

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Not Intersect(ActiveCell, Columns(4)) Is Nothing Then

If ActiveCell > 0 Then

Application.SendKeys "{ENTER}"

End If

End If

End Sub

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

Privacy Policy