Copiar/pegar en otra hoja sin cambiar ventana
Hola, hice una macro para copiar unos valores de la hoja "5-Résumé Plan fabrication" en la hoja "3-Planning livraison" mi problema es que cuando la ejecuto la macro va de una hoja a la otra cada vez que copia y pega, entonces queria saber si hay otra forma de hacer la macro sin que cambie de hoja rapidamente cuando la ejecuto
la macro es la siguiente:
Sub Ejemplo3()
'
' Macro4 Macro
' Macro enregistrée le 26/04/2011 par oretamal
Dim rangon1dtd As String
Dim rangon1gtd As String
Dim rangon1dtg As String
Dim rangon1gtg As String
Dim rangon3dtd As String
Dim rangon3gtd As String
Dim rangon3dtg As String
Dim rangon3gtg As String
rangon1dtd = ActiveSheet.Range("S5").Value
rangon1gtd = ActiveSheet.Range("S8").Value
rangon1dtg = ActiveSheet.Range("S11").Value
rangon1gtg = ActiveSheet.Range("S14").Value
rangon3dtd = ActiveSheet.Range("S18").Value
rangon3gtd = ActiveSheet.Range("S21").Value
rangon3dtg = ActiveSheet.Range("S24").Value
rangon3gtg = ActiveSheet.Range("S27").Value
Worksheets("5-Résumé Plan fabrication").Range("r5").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon1dtd).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Worksheets("5-Résumé Plan fabrication").Range("r8").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon1gtd).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Worksheets("5-Résumé Plan fabrication").Range("r11").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon1dtg).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Worksheets("5-Résumé Plan fabrication").Range("r14").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon1gtg).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sheets("5-Résumé Plan fabrication").Range("r18").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon3dtd).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sheets("5-Résumé Plan fabrication").Range("r21").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon3gtd).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sheets("5-Résumé Plan fabrication").Range("r24").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon3dtg).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sheets("5-Résumé Plan fabrication").Range("r27").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon3gtg).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End Sub
Gracias!
la macro es la siguiente:
Sub Ejemplo3()
'
' Macro4 Macro
' Macro enregistrée le 26/04/2011 par oretamal
Dim rangon1dtd As String
Dim rangon1gtd As String
Dim rangon1dtg As String
Dim rangon1gtg As String
Dim rangon3dtd As String
Dim rangon3gtd As String
Dim rangon3dtg As String
Dim rangon3gtg As String
rangon1dtd = ActiveSheet.Range("S5").Value
rangon1gtd = ActiveSheet.Range("S8").Value
rangon1dtg = ActiveSheet.Range("S11").Value
rangon1gtg = ActiveSheet.Range("S14").Value
rangon3dtd = ActiveSheet.Range("S18").Value
rangon3gtd = ActiveSheet.Range("S21").Value
rangon3dtg = ActiveSheet.Range("S24").Value
rangon3gtg = ActiveSheet.Range("S27").Value
Worksheets("5-Résumé Plan fabrication").Range("r5").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon1dtd).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Worksheets("5-Résumé Plan fabrication").Range("r8").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon1gtd).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Worksheets("5-Résumé Plan fabrication").Range("r11").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon1dtg).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Worksheets("5-Résumé Plan fabrication").Range("r14").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon1gtg).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sheets("5-Résumé Plan fabrication").Range("r18").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon3dtd).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sheets("5-Résumé Plan fabrication").Range("r21").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon3gtd).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sheets("5-Résumé Plan fabrication").Range("r24").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon3dtg).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sheets("5-Résumé Plan fabrication").Range("r27").Select
Selection.Copy
Worksheets("3-Planning livraison ").Range(rangon3gtg).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End Sub
Gracias!
1 respuesta
Respuesta de d2enri
1