Macro VBA [Excel]
Hola, necesito de su ayuda:
Quiero que se ejecute esta macro automáticamente, es decir que mientras este trabajando en la hoja 1 automáticamente este copiando en la hoja 2... Porque los cambios solo surten efecto cuando abro el visual y pongo ejecutar, o cuando cierro el documento y al volverlo abrir pongo ejecutar macros.
Private Sub Workbook_Open()
'
' Macro2 Macro
' Macro grabada el 08/10/2009 por UFenix
'
' Acceso directo: CTRL+q
'
Rows("9:15").Select
Selection.Copy
Sheets("Pets Vivo").Select
Rows("9:9").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Range("I1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Range("H6:I6").Select
ActiveSheet.Paste
Range("K18").Select
Sheets("Pets Base").Select
Range("H7:I7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Range("H7:I7").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("18:18").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("18:18").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("19:19").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("20:20").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("20:20").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("22:22").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("21:21").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("24:24").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("22:22").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("26:26").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=3
Sheets("Pets Base").Select
Rows("23:23").Select
Application.CutCopyMode = False
Selection.Copy
Range("B26:D26").Select
Sheets("Pets Vivo").Select
Rows("28:28").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("24:24").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("30:30").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("25:25").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("32:32").Select
ActiveSheet.Paste
End Sub
Gracias de Antemano
Quiero que se ejecute esta macro automáticamente, es decir que mientras este trabajando en la hoja 1 automáticamente este copiando en la hoja 2... Porque los cambios solo surten efecto cuando abro el visual y pongo ejecutar, o cuando cierro el documento y al volverlo abrir pongo ejecutar macros.
Private Sub Workbook_Open()
'
' Macro2 Macro
' Macro grabada el 08/10/2009 por UFenix
'
' Acceso directo: CTRL+q
'
Rows("9:15").Select
Selection.Copy
Sheets("Pets Vivo").Select
Rows("9:9").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Range("I1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Range("H6:I6").Select
ActiveSheet.Paste
Range("K18").Select
Sheets("Pets Base").Select
Range("H7:I7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Range("H7:I7").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("18:18").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("18:18").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("19:19").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("20:20").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("20:20").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("22:22").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("21:21").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("24:24").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("22:22").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("26:26").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=3
Sheets("Pets Base").Select
Rows("23:23").Select
Application.CutCopyMode = False
Selection.Copy
Range("B26:D26").Select
Sheets("Pets Vivo").Select
Rows("28:28").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("24:24").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("30:30").Select
ActiveSheet.Paste
Sheets("Pets Base").Select
Rows("25:25").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Pets Vivo").Select
Rows("32:32").Select
ActiveSheet.Paste
End Sub
Gracias de Antemano
1 respuesta
Respuesta de hugolaza
1