Copy data from one worksheet to another

0

I have a problem in a macro, I'm trying to copy data from one worksheet and paste it into another one, but it's giving an error when inserting a new line (in yellow).

Sheets:

Code:

SubcopiarDadosEntrePlanilhas()Application.ScreenUpdating=FalseWorksheets(2).Rows("2:2").Insert

'copia de Formulario para Apontamento
    Worksheets("Formulario").Range("B3").Copy Destination:=Worksheets("Apontados").Range("A2")
    Worksheets("Formulario").Range("H3").Copy Destination:=Worksheets("Apontados").Range("B2")
    Worksheets("Formulario").Range("B7").Copy Destination:=Worksheets("Apontados").Range("C2")
    Worksheets("Formulario").Range("H7").Copy Destination:=Worksheets("Apontados").Range("D2")
    Worksheets("Formulario").Range("N3").Copy Destination:=Worksheets("Apontados").Range("E2")
    Worksheets("Formulario").Range("N7").Copy Destination:=Worksheets("Apontados").Range("F2")
    Worksheets("Formulario").Range("N11").Copy Destination:=Worksheets("Apontados").Range("G2")
    Worksheets("Formulario").Range("N14").Copy Destination:=Worksheets("Apontados").Range("H2")
    Worksheets("Formulario").Range("B11").Copy Destination:=Worksheets("Apontados").Range("I2")
    Worksheets("Formulario").Range("H11").Copy Destination:=Worksheets("Apontados").Range("J2")
    Application.CutCopyMode = falso

'Mensagem de texto
    MsgBox "Registro concluído!", vbInformation, "Concluído"
    Application.ScreenUpdating = True

End Sub

Error print together with requested information

    
asked by anonymous 23.04.2018 / 14:10

2 answers

1

Try changing the statement:

Application.CutCopyMode = Falso

by

Application.CutCopyMode = False
    
23.04.2018 / 19:25
0

For your code to run faster, instead of copying and pasting, you could do:

Worksheets("Apontados").cells("A2").value = worksheets("Formulario").cells("B3").value

and repeat this syntax for the other lines of the code.

    
27.04.2018 / 15:52