Here is some code that you can use to erase the existing contents of the worksheet and then put the new values in. If you are only wanting to overwrite certain cells use the Range function to identify them before clearing.
I have to give some credit to Dave Swanton, I took some of his code from
a previous post.
Public Sub DeleteXLWorksheet()
' Attribution to Dave Swanton for some of the code, from
' a previous post
Dim objXL As Excel.Application, wb As Excel.Workbook
Dim ws As Excel.Worksheet
Set objXL = CreateObject("excel.application")
Set wb = objXL.Workbooks.Open("Your Filename goes here")
objXL.Visible = True
For Each ws In wb.Worksheets
If ws.Name = "Your Sheet name" Then
With wb.Sheets(ws.Name)
Cells.Select 'Select all of the cells
Selection.ClearContents 'Clear the contents
Selection.NumberFormat = "General" 'Reset all the formatting
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.Interior.ColorIndex = xlNone
Range("a1").Select 'Move to upper left corner
End With
End If
Next ws
wb.Save
Set objXL = Nothing
End Sub