Macro historial de cardex
Buenas noches, realice una macro en excel 2010 para grabar los datos de una plantilla de orden de compra y hacer un historial en el mismo libro pero no me grabo todos los datos,pero no se como enviarte el archivo para su análisis, podrías ayudarme de favor. Inserto los argumentos esperando sean suficientes.
Sub Orden1()
'
' Orden1 Macro
' Guardar historial de almacen '
'
revisión = Application.WorksheetFunction.CountA(Range("a20:a34"))
If revisión = 0 Then
MsgBox "no hay datos en la orden de compra"
Exit Sub
End If
Sheets("FM").Select
Range("B7").Select
Selection.Copy
Sheets("Acumulado").Select
Range("A3").Select
ActiveSheet.Paste Sheets("FM").Select
Range("B9").Select
Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("G3").Select ActiveSheet.Paste Sheets("FM").Select Range("B11").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("H3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("B13").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("M3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("D7").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("J3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("D9").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("K3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("D11").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("C3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("D13").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("B3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("F4").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("F3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("F6").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("I3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("F9").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("L3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("F11").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("D3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Sheets("FM").Select Range("F13").Select Application.CutCopyMode = False Selection.Copy Sheets("Acumulado").Select Range("E3").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A17:G41").Select Application.CutCopyMode = False Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Sheets("FM").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _ IgnorePrintAreas:=False Sheets("FM").Select Range("B7").ClearContents Range("B9").ClearContents Range("B11").ClearContents Range("B13").ClearContents Range("D7").ClearContents Range("D9").ClearContents Range("D11").ClearContents Range("D13").ClearContents Range("F4").ClearContents Range("F6").ClearContents Range("F9").ClearContents Range("F11").ClearContents Range("F13").ClearContents Range("A17:G41").ClearContents End Sub
Saludos,