I am new to VB and am trying to get an operation that copies some information from the "Client Backup Control" worksheet to the "LOG" worksheet. The process will look like this: When detecting change in any cell in column N of the "Client Backup Control" worksheet, Excel should copy its value from column A (called client code) and paste it into the next blank line of the "LOG" worksheet, where all the
BelowisthecodethatIdid,buteverytimeIgeta"Required Object" error and I can not find the problem
Dim celChave As Range
Dim codCliente As Long
Private Sub Worksheet_Change(ByVal Target As Range)
'celChaves onde fica guardado as celulas que serão alteradas
Set celChave = Sheets("Controle Backup Clientes").Range("N2:N1048576")
If Not Application.Intersect(celChave, Range(Target.Address)) _
Is Nothing Then
codCliente = Sheets("Controle Backup Clientes").Select(0, 1)
Sheets("LOG").Select(1048576, 1).End(x1Up).Offset(1, 0).Paste
Application.CutCopyMode = False
Sheets(Sheets("LOG").Select(1048576, 1).End(x1Up).Offset(0, 1)).FormulaR1C1 = "=TODAY()"
Sheets(Sheets("LOG").Select(1048576, 1).End(x1Up).Offset(0, 2)).Paste = codCliente
MsgBox "CORREÇÃO SALVA NO LOG! CELULA (" & Target.Address & ")"
End If
End Sub