Macro excesivamente lenta al ejecutarla. ¿Se podría abreviar algún paso del código que no sea preciso?

Sub TICKETS()

Application.Calculation = xlCalculationManual
Application.EnableEvents = False
ActiveSheet.DisplayPageBreaks = False
Application.CutCopyMode = False
Application.ScreenUpdating = False

libre = Sheets("Savetickets").Range("A65536").End(xlUp).Row + 2

Sheets("Savetickets").Cells(libre, 1) = ActiveSheet.Range("a10")
Sheets("Savetickets").Cells(libre, 2) = ActiveSheet.Range("b10")
Sheets("Savetickets").Cells(libre, 3) = ActiveSheet.Range("c10")
Sheets("Savetickets").Cells(libre, 4) = ActiveSheet.Range("d10")
Sheets("Savetickets").Cells(libre, 5) = ActiveSheet.Range("e10")
Sheets("Savetickets").Cells(libre, 6) = ActiveSheet.Range("f10")
Sheets("Savetickets").Cells(libre, 7) = ActiveSheet.Range("f7")
Sheets("Savetickets").Cells(libre, 11) = ActiveSheet.Range("p10")
libre = Sheets("Savetickets").Range("A65536").End(xlUp).Row + 1
Sheets("Savetickets").Cells(libre, 1) = ActiveSheet.Range("a11")
Sheets("Savetickets").Cells(libre, 2) = ActiveSheet.Range("b11")
Sheets("Savetickets").Cells(libre, 3) = ActiveSheet.Range("c11")
Sheets("Savetickets").Cells(libre, 4) = ActiveSheet.Range("d11")
Sheets("Savetickets").Cells(libre, 5) = ActiveSheet.Range("e11")
Sheets("Savetickets").Cells(libre, 6) = ActiveSheet.Range("f11")
Sheets("Savetickets").Cells(libre, 7) = ActiveSheet.Range("f7")
Sheets("Savetickets").Cells(libre, 11) = ActiveSheet.Range("p11")
libre = Sheets("Savetickets").Range("A65536").End(xlUp).Row + 1
Sheets("Savetickets").Cells(libre, 1) = ActiveSheet.Range("a12")
Sheets("Savetickets").Cells(libre, 2) = ActiveSheet.Range("b12")
Sheets("Savetickets").Cells(libre, 3) = ActiveSheet.Range("c12")
Sheets("Savetickets").Cells(libre, 4) = ActiveSheet.Range("d12")
Sheets("Savetickets").Cells(libre, 5) = ActiveSheet.Range("e12")
Sheets("Savetickets").Cells(libre, 6) = ActiveSheet.Range("f12")
Sheets("Savetickets").Cells(libre, 7) = ActiveSheet.Range("f7")
Sheets("Savetickets").Cells(libre, 11) = ActiveSheet.Range("p12")
libre = Sheets("Savetickets").Range("A65536").End(xlUp).Row + 1
Sheets("Savetickets").Cells(libre, 1) = ActiveSheet.Range("a13")
Sheets("Savetickets").Cells(libre, 2) = ActiveSheet.Range("b13")
Sheets("Savetickets").Cells(libre, 3) = ActiveSheet.Range("c13")
Sheets("Savetickets").Cells(libre, 4) = ActiveSheet.Range("d13")
Sheets("Savetickets").Cells(libre, 5) = ActiveSheet.Range("e13")
Sheets("Savetickets").Cells(libre, 6) = ActiveSheet.Range("f13")
Sheets("Savetickets").Cells(libre, 7) = ActiveSheet.Range("f7")
Sheets("Savetickets").Cells(libre, 11) = ActiveSheet.Range("p13")
libre = Sheets("Savetickets").Range("A65536").End(xlUp).Row + 1
Sheets("Savetickets").Cells(libre, 1) = ActiveSheet.Range("a14")
Sheets("Savetickets").Cells(libre, 2) = ActiveSheet.Range("b14")
Sheets("Savetickets").Cells(libre, 3) = ActiveSheet.Range("c14")
Sheets("Savetickets").Cells(libre, 4) = ActiveSheet.Range("d14")
Sheets("Savetickets").Cells(libre, 5) = ActiveSheet.Range("e14")
Sheets("Savetickets").Cells(libre, 6) = ActiveSheet.Range("f14")
Sheets("Savetickets").Cells(libre, 7) = ActiveSheet.Range("f7")
Sheets("Savetickets").Cells(libre, 11) = ActiveSheet.Range("p14")

libre = Sheets("Savetickets").Range("A65536").End(xlUp).Row + 0
Sheets("Savetickets").Cells(libre, 8) = ActiveSheet.Range("e21")


Application.Calculation = xlCalculationAutomatic
Application.CutCopyMode = False
ActiveSheet.DisplayPageBreaks = True
Application.EnableEvents = True
Application.ScreenUpdating = True

0

Añade tu respuesta

Haz clic para o