Limpiar datos al culminar el mes
Compañeos tengo la siguiente rutina de trabajo:
Sub MetodoAbrirLibro()
Application.ScreenUpdating = False
Application.EnableEvents = False
ActiveSheet.DisplayPageBreaks = False
Ayer = DateSerial(Year(Now), Month(Now), Day(Now)) - 1
Workbooks.Open "\\10.7.10.1\logistica\Logistica Publico\Bodega\Inventarios_bodega\Cierre de inventarios\Cierre de inventarios " & Format(Now, "yyyy") & "\Cierre inventarios " & Format(Ayer, "mmmm") & ".xls"
With Workbooks("Cierre inventarios " & Format(Ayer, "mmmm") & ".xls")
Fin_Mes = Day(Application.WorksheetFunction.EoMonth(ThisWorkbook.Sheets("Hoja1").Range("M1"), 0))
For a = 1 To Fin_Mes
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(2 + a, 2).Value = .Sheets(a + 1).Range("D18").Value
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(2 + a, 3).Value = .Sheets(a + 1).Range("E18").Value
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(2 + a, 4).Value = .Sheets(a + 1).Range("J18").Value
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(2 + a, 5).Value = .Sheets(a + 1).Range("O18").Value
Next a
.Close
End With
Workbooks.Open "\\10.7.10.1\logistica\Logistica Publico\Informe Diario " & Format(Now, "yyyy") & ".xlsx"
With Workbooks("Informe Diario " & Format(Now, "yyyy") & ".xlsx")
For b = 3 To (Fin_Mes + 2)
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(b, 6) = .Sheets(Format(Ayer, "MMMM yyyy")).Cells(2, b)
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(b, 7) = .Sheets(Format(Ayer, "MMMM yyyy")).Cells(5, b)
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(b, 8) = .Sheets(Format(Ayer, "MMMM yyyy")).Cells(7, b)
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(b, 9) = .Sheets(Format(Ayer, "MMMM yyyy")).Cells(6, b)
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(b, 10) = .Sheets(Format(Ayer, "MMMM yyyy")).Cells(8, b)
Workbooks("Indicadores.xlsm").Sheets("Hoja1").Cells(b, 11) = .Sheets(Format(Ayer, "MMMM yyyy")).Cells(9, b)
Next b
.Close
End With
Workbooks("Indicadores.xlsm").Save
Application.ScreenUpdating = True
Application.EnableEvents = True
ActiveSheet.DisplayPageBreaks = True
Application.CutCopyMode = False
End Sub
Lo que deseo es que cada vez que culmine el mes los datos se borren para que queden limpias las celdas para el nuevo mes.