Professional Documents
Culture Documents
Application.ScreenUpdating = False
Sheets("SUMAS Y SALDOS").Select
Range("A11:G1000").Select
Selection.Clear
Selection.Font.Bold = False
Range("B10:C23").Select
Selection.ClearContents
Sheets("DIARIO").Select
Range("A1").Select
Range("tablaLibroDiario[[C�DIGO]:[CUENTA]]").Copy
Sheets("SUMAS Y SALDOS").Select
Range("B10").Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
'QUITAR DUPLICADOS
ActiveSheet.Range("B10:C10000").RemoveDuplicates Columns:=Array(1, 2)
FILA_MARGEN = Range("C1048576").End(xlUp).Row
Range("B8", Cells(FILA_MARGEN + 1, 7)).Select
'PONER MARGEN A LO SELECCINADO
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Range("D10:G10").Select
Selection.AutoFill Destination:=Range("D10", Cells(FILA_MARGEN, 7)),
Type:=xlFillDefault
Range("D10:G10").Select
Range("A1").Select
Application.ScreenUpdating = True
End Sub